import{k as r,l as d,o as u,j as a,E as m,G as h}from"./app-BgLa5dit.js";import{a as S}from"./4qGb1BIY.chunk.js";import{S as E,a as v}from"./v4dOQXXE.chunk.js";import{C as c}from"./CdBbWXza.chunk.js";import"./DnXDEnAR.chunk.js";function j(t){var i;const o=r(),s=d(),e=u(c.getSpecialEvent(t.id));async function l(n,p){try{await o(c.editSpecialEvent(t.id,n)),s.success(`Successfully updated special event <strong>${n.name}</strong>`),t.closePopup()}catch{s.error("Failed to update special event"),p()}}return a.jsx(m,{title:`Edit ${(i=e.data)==null?void 0:i.name}`,closePopup:t.closePopup,backdrop:"static",showLoadingSpinner:!e.hasCompleted,children:e.hasCompleted&&a.jsx(h,{initialValues:{name:e.data.name,description:e.data.description,type:e.data.type,status:S.Published},onSubmit:l,validationSchema:E,children:a.jsx(v,{onClickCancel:t.closePopup,isNew:!1})})})}export{j as EditSpecialEventView};
//# sourceMappingURL=DozHb7Og.chunk.js.map
