1import{p as o,W as l,r,o as c,j as e,L as i,q as m}from"./index-B-aW8nfO.js";import{C as x}from"./circle-check-_t67Qt_5.js";/** 2 * @license lucide-react v0.475.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const d=[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h9",key:"1j9vog"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m17 17 4 4",key:"1b3523"}],["path",{d:"m21 17-4 4",key:"uinynz"}]],u=o("MailX",d);function b(){const[n]=l(),t=n.get("token")||"",[a,s]=r.useState("loading");return r.useEffect(()=>{if(!t){s("error");return}(async()=>{try{await c.functions.invoke("newsletterUnsubscribe",{token:t}),s("done")}catch{s("error")}})()},[t]),e.jsxs("div",{className:"max-w-xl mx-auto px-4 py-16 text-center",children:[a==="loading"&&e.jsx(i,{className:"w-9 h-9 mx-auto animate-spin text-emerald-700"}),a==="done"&&e.jsxs(e.Fragment,{children:[e.jsx(x,{className:"w-11 h-11 mx-auto text-emerald-700"}),e.jsx("h1",{className:"font-heading font-extrabold text-2xl text-emerald-950 mt-4",children:"You're unsubscribed."}),e.jsx("p",{className:"text-slate-500 mt-2",children:"You will no longer receive the Country Herald afternoon briefing."})]}),a==="error"&&e.jsxs(e.Fragment,{children:[e.jsx(u,{className:"w-11 h-11 mx-auto text-amber-500"}),e.jsx("h1",{className:"font-heading font-extrabold text-2xl text-emerald-950 mt-4",children:"We couldn't find that subscription."}),e.jsx("p",{className:"text-slate-500 mt-2",children:"The unsubscribe link may be incomplete or already inactive."})]}),e.jsx(m,{to:"/",className:"inline-flex mt-6 rounded-xl bg-emerald-950 text-white px-4 py-2.5 text-sm font-semibold",children:"Back to Country Herald"})]})}export{b 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.