(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,73207,e=>{"use strict";var t=e.i(43476),i=e.i(71645),n=e.i(18566);function s({children:e,onClick:i,disabled:n,tone:a}){return(0,t.jsx)("button",{type:"button",onClick:i,disabled:n,className:`be-act be-act-${a}`,children:e})}e.s(["default",0,function({organizerId:e,status:a,hasPayoutAccount:l,payoutVerified:r}){let d=(0,n.useRouter)(),[c,o]=(0,i.useState)(!1),[u,h]=(0,i.useState)(null);async function p(e,t,i){if(i&&!confirm(i))return;h(null),o(!0);let n=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),s=await n.json().catch(()=>({}));(o(!1),n.ok)?d.refresh():h(s.error||"Action failed")}let f=(t,i)=>p("/api/admin/organizers/status",{organizerId:e,status:t},i),b=t=>p("/api/admin/payout-accounts/verify",{organizerId:e,verified:t});return(0,t.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap justify-end gap-1.5",children:[l&&(r?(0,t.jsx)(s,{onClick:()=>b(!1),disabled:c,tone:"ghost",children:"Unverify"}):(0,t.jsx)(s,{onClick:()=>b(!0),disabled:c,tone:"primary",children:"Verify payout"})),"active"!==a&&(0,t.jsx)(s,{onClick:()=>f("active"),disabled:c,tone:"ghost",children:"Reactivate"}),"active"===a&&(0,t.jsx)(s,{onClick:()=>f("suspended","Suspend this organizer? They can't edit or publish events while suspended."),disabled:c,tone:"warn",children:"Suspend"}),"banned"!==a&&(0,t.jsx)(s,{onClick:()=>f("banned","Ban this organizer? Their published events are hidden from the public site."),disabled:c,tone:"danger",children:"Ban"})]}),u&&(0,t.jsx)("span",{className:"text-xs text-[color:var(--pill-danger-fg)]",children:u})]})}])}]);