import{r as s,j as n}from"./router.chunk.YsRm4bSN.js";import{u as r,A as a,ai as o,t,K as e,x as i,y as c,z as u,aj as l,G as m,T as d,J as p}from"./main.chunk.N-eZ2ybB.js";import{s as sprintf,_ as __}from"./wordpress.chunk.BVds2GcU.js";import{k as h,c as j}from"./forms.chunk.Bz8aaTWe.js";import{S as f}from"./switch-field.chunk.CouXKsOC.js";import{u as g}from"./use-update-dirty-state.chunk.Bh3v76yr.js";import{A as k}from"./settings.chunk.D9nMP-Um.js";import{u as x}from"./use-route-blocker-guard.chunk.CxzDiMl1.js";import"./react-jsx-runtime.chunk.ATkk6v2S.js";import"./react.js";import"./react-dom-client.chunk.BMQ1litG.js";import"./react-dom.js";import"./pdf-core.chunk.D33I_Wdh.js";import"./ui-radix.chunk.Xzokq_Gv.js";import"./utils.chunk.C1IATKsN.js";import"./icons.chunk.BwnSC3zE.js";import"./date-utils.chunk.DWRtWTmT.js";import"./switch.chunk.BWrU_4pe.js";import"./template-layout-context.chunk.B1U8ZWnY.js";const w=()=>{const{appConfig:w}=r(),y=h({resolver:p(k)});s.useEffect(()=>{w[a.Advanced]&&y.reset.call(null,w[a.Advanced])},[w,y.reset]);const{registerForm:v,isCurrentFormDirty:C}=o();s.useEffect(()=>{const s=v(a.Advanced,y);return()=>{s()}},[v]),g(y),x({isDirty:C});const _=j({control:y.control,name:"campaign_permalink"}),A=s.useMemo(()=>{if(!_)return;const s=window.location.origin;return sprintf("%s/%s/slug-of-the-campaign",s,t(_,"/"))},[_]);return n.jsx(e,{...y,children:n.jsxs("div",{className:"growfund-grid growfund-gap-4",children:[n.jsxs(i,{children:[n.jsxs(c,{children:[n.jsx(u,{children:__("System Configuration","growfund")}),n.jsx(l,{children:__("Control system settings and performance options.","growfund")})]}),n.jsx(m,{className:"growfund-space-y-4",children:n.jsx(d,{control:y.control,name:"campaign_permalink",label:__("Campaign Permalink","growfund"),placeholder:__("e.g. campaigns","growfund"),description:A})})]}),n.jsxs(i,{children:[n.jsxs(c,{children:[n.jsx(u,{children:__("Data Management","growfund")}),n.jsx(l,{children:__("Configure data handling, retention, and cleanup options.","growfund")})]}),n.jsx(m,{className:"growfund-space-y-4",children:n.jsx(f,{control:y.control,name:"erase_data_upon_uninstallation",label:__("Erase Data Upon Uninstallation","growfund"),description:__("This removes all data when the plugin is uninstalled.","growfund")})})]})]})})};export{w as default};
