1import{c as h,_ as y,r as i,j as t,G as b,y as g,h as k,s as f}from"./index-DocTL6Xp.js";import{C}from"./circle-check-conwmP9q.js";const r={bg:"#FAF9F5",surface:"#FFFFFF",ink:"#1A1A1A",inkMuted:"#6B6B68",border:"#E8E5DD",accent:"#2563EB"},v=()=>{const o=h(),[l]=y(),[s,a]=i.useState(!1),[x,m]=i.useState(!1);return i.useEffect(()=>{document.title="Newsletter Subscription Confirmation | GoExpired";const c=document.querySelector('meta[name="description"]');if(c)c.setAttribute("content","Thank you for confirming your GoExpired newsletter subscription.");else{const e=document.createElement("meta");e.name="description",e.content="Thank you for confirming your GoExpired newsletter subscription.",document.head.appendChild(e)}const n=document.querySelector('link[rel="canonical"]');if(n)n.setAttribute("href","https://goexpired.com/thank-you");else{const e=document.createElement("link");e.setAttribute("rel","canonical"),e.setAttribute("href","https://goexpired.com/thank-you"),document.head.appendChild(e)}},[]),i.useEffect(()=>{(async()=>{const n=l.get("token");if(!n){o("/confirm-email");return}a(!0);try{const{data:e,error:d}=await f.functions.invoke("confirm-newsletter",{body:{token:n}});if(d)throw d;if(!(e!=null&&e.success)){o("/");return}const u=e.email;if(e.code==="already_confirmed"){m(!0),a(!1);return}if(u)try{await f.functions.invoke("add-to-brevo-list",{body:{email:u,listId:6}})}catch(p){console.error("Brevo error (non-critical):",p)}m(!0)}catch(e){console.error("Confirmation error:",e),o("/")}finally{a(!1)}})()},[l,o]),t.jsxs("div",{className:"min-h-screen flex flex-col",style:{backgroundColor:r.bg,color:r.ink,fontFamily:"'Inter', system-ui, sans-serif"},children:[t.jsx(b,{activeLink:"newsletter"}),t.jsx("main",{className:"flex-1 flex items-center justify-center px-4 py-12",children:t.jsx("div",{className:"w-full max-w-lg",children:t.jsxs("div",{className:"rounded-3xl p-8 md:p-10 text-center",style:{backgroundColor:r.surface,border:`1px solid ${r.border}`,boxShadow:"0 1px 2px rgba(26,26,26,0.04), 0 8px 32px -16px rgba(26,26,26,0.08)"},children:[t.jsx("div",{className:"inline-flex items-center justify-center w-14 h-14 rounded-full mb-6",style:{backgroundColor:`${r.accent}10`},children:s?t.jsx(g,{className:"w-6 h-6 animate-spin",style:{color:r.accent}}):t.jsx(C,{className:"w-6 h-6",style:{color:r.accent}})}),t.jsx("h1",{className:"text-3xl md:text-4xl tracking-tight mb-3",style:{fontFamily:"'Cormorant', serif",fontWeight:600},children:s?"Confirming your subscription...":x?"Subscription confirmed":"You're all set"}),t.jsx("p",{className:"text-sm md:text-base mb-8",style:{color:r.inkMuted},children:s?"One moment while we confirm your email.":"You'll now receive one daily email with the very best hand-picked domain auctions, delivered straight to your inbox."}),!s&&t.jsx("button",{onClick:()=>o("/"),className:"w-full py-3 rounded-full text-sm font-medium transition-all duration-200 hover:-translate-y-[1px]",style:{backgroundColor:r.accent,color:"#FFFFFF",boxShadow:"0 4px 14px -4px rgba(37, 99, 235, 0.45), inset 0 1px 0 rgba(255,255,255,0.25)"},children:"Go to homepage"})]})})}),t.jsx(k,{})]})};export{v 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.