(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,17658,e=>{"use strict";var t=e.i(43476);function r(...e){return e.filter(Boolean).join(" ")}e.i(22016);let i={primary:"bg-brand-green text-white hover:bg-brand-green-deep focus-visible:ring-brand-green",secondary:"border border-be-border bg-be-surface text-be-text hover:bg-be-surface-2 focus-visible:ring-brand-green",ghost:"text-be-muted hover:text-be-text hover:bg-be-surface-2 focus-visible:ring-brand-green",danger:"bg-[color:var(--pill-danger-fg)] text-white hover:opacity-90 focus-visible:ring-[color:var(--pill-danger-fg)]"};e.s(["Card",0,function({className:e,children:i}){return(0,t.jsx)("div",{className:r("be-card p-5",e),children:i})},"buttonClass",0,function(e="primary",t){return r("inline-flex items-center justify-center gap-1.5 rounded-lg px-4 py-2 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-be-bg disabled:opacity-50 disabled:pointer-events-none",i[e],t)}])},85919,e=>{"use strict";var t=e.i(43476),r=e.i(71645),i=e.i(18566),n=e.i(17658);e.s(["default",0,function({campaignId:e}){let s=(0,i.useRouter)(),[o,a]=(0,r.useState)(!1),[u,c]=(0,r.useState)(null);async function l(){if(!confirm("Queue this campaign for sending? This can't be undone."))return;a(!0),c(null);let t=await fetch(`/api/campaigns/${e}/send`,{method:"POST"}),r=await t.json().catch(()=>({}));(a(!1),t.ok)?s.refresh():c(r.error||"Could not queue campaign")}return(0,t.jsxs)("div",{children:[(0,t.jsx)("button",{type:"button",onClick:l,disabled:o,className:(0,n.buttonClass)("primary"),children:o?"Queueing…":"Send campaign"}),u&&(0,t.jsx)("p",{className:"mt-2 text-sm text-red-600",children:u})]})}])}]);