module.exports=[71426,a=>{"use strict";var b=a.i(87924),c=a.i(72131);a.s(["default",0,function({customerId:a,signature:d}){let[e,f]=(0,c.useState)("idle");async function g(){f("loading"),f((await fetch("/api/campaigns/email/unsubscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({customerId:a,signature:d})})).ok?"done":"error")}return"done"===e?(0,b.jsx)("p",{className:"text-muted",children:"You've been unsubscribed. Sorry to see you go."}):(0,b.jsxs)("div",{children:[(0,b.jsx)("button",{onClick:g,disabled:"loading"===e,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"===e?"Unsubscribing…":"Unsubscribe"}),"error"===e&&(0,b.jsx)("p",{className:"mt-3 text-sm text-red-400",children:"Something went wrong. Please try again."})]})}])}];

//# sourceMappingURL=src_app_unsubscribe_unsubscribe-form_tsx_1xo2kz0._.js.map