(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,931,e=>{"use strict";var t=e.i(43476),n=e.i(71645);e.s(["default",0,function({customerId:e,signature:i}){let[s,o]=(0,n.useState)("idle");async function r(){o("loading"),o((await fetch("/api/campaigns/email/unsubscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({customerId:e,signature:i})})).ok?"done":"error")}return"done"===s?(0,t.jsx)("p",{className:"text-muted",children:"You've been unsubscribed. Sorry to see you go."}):(0,t.jsxs)("div",{children:[(0,t.jsx)("button",{onClick:r,disabled:"loading"===s,className:"inline-flex items-center justify-center rounded-lg bg-brand-green px-5 py-2.5 text-sm font-medium text-white transition-colors hover:bg-brand-green-deep disabled:opacity-50",children:"loading"===s?"Unsubscribing…":"Unsubscribe"}),"error"===s&&(0,t.jsx)("p",{className:"mt-3 text-sm text-red-400",children:"Something went wrong. Please try again."})]})}])}]);