1import{j as e}from"./vendor-radix-Dk5EADsD.js";import{r as c}from"./vendor-icons-1Epf-oS6.js";import{a as g,P as p}from"./index-IKIfw3fw.js";import"./vendor-shared-DPVqYjs3.js";import"./vendor-firebase-C7hCx58d.js";import"./vendor-sentry-DmdyWBNq.js";import"./vendor-dnd-CpaV1WNp.js";const u="https://us-central1-crazy-crm.cloudfunctions.net",f="https://www.crazycrm.app/images/logo.png";function S(){const i=(()=>{try{return new URLSearchParams(window.location.search).get("e")||""}catch{return""}})(),[s,n]=c.useState("choice"),{isRTL:d}=g(),t=(l,b)=>d?l:b,[o,m]=c.useState(""),[r,a]=c.useState(!1),x=async()=>{a(!0);try{await fetch(`${u}/unsubscribe?e=${encodeURIComponent(i)}`,{method:"POST"})}catch{}a(!1),n("done")},h=async()=>{if(o.trim()){a(!0);try{await fetch(`${u}/submitImprovementFeedback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:o.trim(),email:i})})}catch{}a(!1),n("sent")}};return e.jsxs("div",{dir:d?"rtl":"ltr",className:"min-h-screen flex items-center justify-center bg-slate-950 text-white px-4 font-sans",children:[e.jsx(p,{}),e.jsxs("div",{className:"w-full max-w-md bg-slate-900 border border-slate-800 rounded-2xl shadow-2xl p-5 sm:p-8 text-center space-y-5",children:[e.jsx("img",{src:f,alt:"CRAZY CRM",className:"w-16 h-16 mx-auto rounded-xl object-contain"}),s==="choice"&&e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"text-2xl font-bold",children:t("×× ×× × ×¢×¦×××× ×ר××ת ×××ª× ×¢××× :)","Sorry to see you go :)")}),e.jsx("p",{className:"text-slate-400 text-sm",children:t("××¤× × ×©×ª×× â ×פשר ××××ר:","Before you leave, you can choose:")}),e.jsxs("div",{className:"space-y-3 pt-1",children:[e.jsx("button",{onClick:x,disabled:r,className:"w-full rounded-xl bg-red-600 hover:bg-red-700 text-white font-bold py-3 transition-colors disabled:opacity-50",children:r?"...":t("×סר ×××ª× ×רש××ת ×תפ×צ×","Unsubscribe me")}),e.jsx("button",{onClick:()=>n("feedback"),className:"w-full rounded-xl border-2 border-orange-500 text-orange-400 hover:bg-orange-500 hover:text-white font-bold py-3 transition-colors",children:t("× ×©×× ××שתפר! â ש×××ת ××¦×¢× ×ש×פ×ר","Help us improve â send a suggestion")})]})]}),s==="done"&&e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"text-2xl font-bold",children:t("××סרת ××צ××× â
","Youâre unsubscribed â
")}),e.jsxs("p",{className:"text-slate-400 text-sm",children:[t("×× ××ש××× ×××× ××תר ××××¢×ת ××××××××ת ×âCRAZY CRM.","Youâll no longer receive automated messages from CRAZY CRM."),e.jsx("br",{}),t("ת××× ×פשר ××××ר ð","Youâre always welcome back ð")]})]}),s==="feedback"&&e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"text-2xl font-bold",children:t("× ×©×× ××שתפר! ð","Help us improve ð")}),e.jsx("p",{className:"text-slate-400 text-sm",children:t("×× ×××× × ×××××× ×עש×ת ××רת? (×פשר ×× ××× ××ש××ר פר×××)","What could we have done better? (no details required)")}),e.jsx("textarea",{value:o,onChange:l=>m(l.target.value),rows:4,autoFocus:!0,placeholder:t("×ת×× ×× × ×××...","Write to us here..."),className:"w-full rounded-xl bg-slate-950 border border-slate-700 text-white p-3 text-sm focus:outline-none focus:border-orange-500"}),e.jsx("button",{onClick:h,disabled:r||!o.trim(),className:"w-full rounded-xl bg-orange-500 hover:bg-orange-600 text-white font-bold py-3 transition-colors disabled:opacity-50",children:r?t("ש×××...","Sending..."):t("ש×××ת ××צע×","Send suggestion")})]}),s==="sent"&&e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"text-2xl font-bold",children:t("ת××× ×¨××! ð§¡","Thank you! ð§¡")}),e.jsx("p",{className:"text-slate-400 text-sm",children:t("×××¦×¢× × ×©××× ×ש×ר×ת ×××××. × ×©×× ×ר××ת ×××ª× ×©××.","Your suggestion went straight to Elchai. Hope to see you again.")})]})]})]})}export{S as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.