import{l as u,k as d,R as h,o as p,j as e,E as v,a9 as t}from"./app-BgLa5dit.js";import{C as x}from"./Cgoejc6d.chunk.js";import{L as f}from"./CEktWpXS.chunk.js";import{L as l}from"./CCXfeKmU.chunk.js";function C(a){const n=u(),i=d(),[r,o]=h.useState(!1),s=p(l.livestream(a.id));async function c(){try{await i(l.removeLivestream(s.data.id)),n.success("Livestream has been deleted successfully")}catch{n.error("Something went wrong")}finally{a.closePopup()}}return e.jsx(v,{title:"Delete livestream",closePopup:a.closePopup,showLoadingSpinner:!s.data,children:s.data&&e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Are you sure you want to delete the livestream: ",e.jsx("strong",{children:s.data.name}),"?"]}),e.jsx("p",{children:"Please make sure to notify any users who have signed up for this event that it has now been cancelled."}),e.jsx("p",{className:"mb-1",children:"Details:"}),e.jsx(f,{livestream:s.data}),e.jsx(x,{challengePhrase:s.data.name,onChallengePass:m=>o(m)}),e.jsxs(t,{className:"mt-3",children:[e.jsx(t.Cancel,{onClick:a.closePopup}),e.jsx(t.Submit,{variant:"danger",onClick:c,text:"Delete livestream",disabled:!r})]})]})})}export{C as StreamableDeleteLivestream};
//# sourceMappingURL=DV1vyhts.chunk.js.map
