1import{a,j as e,H as b,av as h,aw as g}from"./index-CQsCPMiJ.js";import{u as y}from"./use-page-title-B2FPq3IO.js";const j=["I don't sell on Amazon anymore","It slowed down my browser","I didn't find it useful","It was too expensive","I found a better tool","Other"];function k(){y("Extension Feedback | ClearSell","Help us improve ClearSell.");const[s,c]=a.useState(""),[l,m]=a.useState(""),[u,x]=a.useState(!1),[o,n]=a.useState(!1),[i,r]=a.useState("");async function p(t){if(t.preventDefault(),!!s){n(!0),r("");try{const d=await fetch("/api/ext/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:s,details:l||void 0})});if(!d.ok){const f=await d.json().catch(()=>({}));r(f.error||"Something went wrong. Please try again."),n(!1);return}x(!0)}catch{r("Something went wrong. Please try again."),n(!1)}}}return e.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[e.jsxs(b,{children:[e.jsx("title",{children:"Extension Feedback | ClearSell"}),e.jsx("meta",{name:"description",content:"Help us improve the ClearSell Chrome extension."}),e.jsx("meta",{name:"robots",content:"noindex, nofollow"}),e.jsx("link",{rel:"canonical",href:"https://clearsell.app/extension-feedback"})]}),e.jsx(h,{}),e.jsx("div",{className:"max-w-[520px] mx-auto px-4 sm:px-6 py-10 sm:py-16",style:{paddingTop:"120px"},children:u?e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-14 h-14 rounded-full mx-auto mb-4 flex items-center justify-center",style:{background:"rgba(0,255,127,0.08)",border:"1px solid rgba(0,255,127,0.15)"},children:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"#00FF7F",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"20 6 9 17 4 12"})})}),e.jsx("h1",{className:"font-display text-2xl font-bold text-white mb-2",children:"Thank you for your feedback."}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Your response helps us build a better product."})]}):e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"font-display text-2xl sm:text-3xl font-bold text-white mb-2",children:"We're sorry to see you go."}),e.jsx("p",{className:"text-muted-foreground mb-8",children:"Help us improve ClearSell â what made you uninstall?"}),e.jsxs("form",{onSubmit:p,className:"space-y-4",children:[e.jsx("div",{className:"space-y-2",children:j.map(t=>e.jsxs("label",{onClick:()=>c(t),className:"flex items-center gap-3 p-3 rounded-lg border cursor-pointer transition-colors",style:{background:s===t?"rgba(0,255,127,0.04)":"rgba(0,0,0,0.15)",borderColor:s===t?"rgba(0,255,127,0.2)":"#1a1a2a"},children:[e.jsx("div",{className:"w-4 h-4 rounded-full border-2 flex items-center justify-center flex-shrink-0",style:{borderColor:s===t?"#00FF7F":"#50506a"},children:s===t&&e.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:"#00FF7F"}})}),e.jsx("span",{className:"text-sm",style:{color:s===t?"#f0f0f5":"#8888a0"},children:t})]},t))}),e.jsx("div",{children:e.jsx("textarea",{value:l,onChange:t=>m(t.target.value),placeholder:"Tell us more (optional)",rows:3,maxLength:2e3,className:"w-full p-3 rounded-lg text-sm outline-none resize-none transition-colors",style:{background:"rgba(0,0,0,0.2)",border:"1px solid #1a1a2a",color:"#f0f0f5",fontFamily:"'DM Sans', sans-serif"}})}),i&&e.jsx("p",{className:"text-sm",style:{color:"#EF4444"},children:i}),e.jsx("button",{type:"submit",disabled:!s||o,className:"w-full py-3 rounded-lg text-sm font-semibold transition-opacity",style:{background:"#00FF7F",color:"#000",opacity:!s||o?.5:1,cursor:!s||o?"not-allowed":"pointer",border:"none",fontFamily:"'DM Sans', sans-serif"},children:o?"Submitting...":"Submit Feedback"})]})]})}),e.jsx(g,{})]})}export{k 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.