1import{d as _,c as z,a as E,y as h,z as F,au as I,a_ as w,t as l,Q as S,j as c,dd as O}from"./index-DEpx10yq.js";import{r as f}from"./vendor-BuXdE1tY.js";import{o as j,C as x}from"./CustomFormForm-DUdB1lJ2.js";import{S as k}from"./Section-sxHNObk1.js";import{e as q}from"./memberships-DyHjVvT4.js";import"./app-4WdNMoJ4.js";import"./dayjs-timezone-iana-plugin-BLhLpZHa.js";import"./get-CagKNSzu.js";import"./page-sections-R39GbdJy.js";import"./FAIconPicker-Bhh9XoV2.js";import"./LazyFAIcon-C8rNEnh4.js";import"./WYSIWYG-Cj-RNIvf.js";import"./WhitelabelInternationalizedInput-D0Njl7LJ.js";import"./SectionSticky-wkA4dTQt.js";import"./index-BZ-f6POW.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="9e79de94-9dcd-4615-ab85-6c99e5feddf5",e._sentryDebugIdIdentifier="sentry-dbid-9e79de94-9dcd-4615-ab85-6c99e5feddf5")}catch{}const v={en:"Changes saved!",nl:"Je wijzigingen zijn opgeslagen!"},C={en:"Edit Form",nl:"Bewerken"},D={successMessage:v,title:C},R=["name","anon_submission_enabled","elements","organizer_to_notify_id","submit_message"],W=()=>{const e=_();if(!e.formId||!e.organizationSlug)throw new Error("formId or organizationSlug param not found");const o=z(),s=E(D),g=Number(e.formId),a=h(),d=F(),r=I(),{setGlobalErrorOnResponseFail:m}=w(),{data:t,error:n}=l.forms.get.useQuery({formId:g}),u=l.forms.update.useMutation(),p=q(r.id);f.useEffect(()=>{n&&m(S.Form)(n)},[n,m]);const y=f.useCallback(async i=>{if(t)return u.mutateAsync({formId:t.id,...i,elements:(i.elements||[]).filter(Boolean),organizer_to_notify_id:i.organizer_to_notify_id||null}).then(a({message:s("successMessage")})).then(()=>o(`/o/${r.slug}/forms/${t.id}`)).catch(d())},[u,t,o,r.slug,s,a,d]);if(!t||!t.hasOwnProperty("elements"))return null;const b=j(t);return c.jsx(k,{heading:s("title"),children:c.jsx(x,{organizationId:r.id,onSubmit:y,initialValues:O(t,R),isEdit:!0,administratorList:p,currentOrganizer:b})})};export{W as default}; 2//# sourceMappingURL=index-CFOnDyi5.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.