module.exports=[9529,a=>{"use strict";var b=a.i(87924);function c(...a){return a.filter(Boolean).join(" ")}a.i(38246);let d={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)]"};a.s(["Card",0,function({className:a,children:d}){return(0,b.jsx)("div",{className:c("be-card p-5",a),children:d})},"buttonClass",0,function(a="primary",b){return c("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",d[a],b)}])},35743,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(9529);a.s(["default",0,function({campaignId:a}){let f=(0,d.useRouter)(),[g,h]=(0,c.useState)(!1),[i,j]=(0,c.useState)(null);async function k(){if(!confirm("Queue this campaign for sending? This can't be undone."))return;h(!0),j(null);let b=await fetch(`/api/campaigns/${a}/send`,{method:"POST"}),c=await b.json().catch(()=>({}));(h(!1),b.ok)?f.refresh():j(c.error||"Could not queue campaign")}return(0,b.jsxs)("div",{children:[(0,b.jsx)("button",{type:"button",onClick:k,disabled:g,className:(0,e.buttonClass)("primary"),children:g?"Queueing…":"Send campaign"}),i&&(0,b.jsx)("p",{className:"mt-2 text-sm text-red-600",children:i})]})}])}];

//# sourceMappingURL=src_0alp8r-._.js.map