module.exports=[37546,a=>{"use strict";var b=a.i(839769);function c(a,d={}){let{successDuration:e=1500}=d,[f,g]=(0,b.useState)({status:"idle",data:null,error:null}),h=(0,b.useRef)(null);(0,b.useEffect)(()=>()=>{h.current&&clearTimeout(h.current)},[]);let i=(0,b.useCallback)(async(...b)=>{h.current&&clearTimeout(h.current),g({status:"loading",data:null,error:null});try{let c=await a(...b);return g({status:"success",data:c,error:null}),e>0&&(h.current=setTimeout(()=>{g(a=>({...a,status:"idle"}))},e)),c}catch(b){let a=b instanceof Error?b:Error("Request failed");throw g({status:"error",data:null,error:a}),a}},[a,e]);return{...f,isLoading:"loading"===f.status,run:i,reset:()=>g({status:"idle",data:null,error:null})}}a.s(["useRequest",()=>c])},56656,a=>{"use strict";var b=a.i(254157),c=a.i(467313),d=a.i(395465),e=a.i(694075);function f({status:a}){return"loading"===a?(0,b.jsx)(d.IconLoader2,{className:"h-4 w-4 animate-spin text-muted-foreground"}):"success"===a?(0,b.jsx)(c.IconCheck,{className:"h-4 w-4 text-emerald-500"}):"error"===a?(0,b.jsx)(e.IconX,{className:"h-4 w-4 text-destructive"}):null}a.s(["RequestIndicator",()=>f])},681230,a=>{"use strict";var b=a.i(254157),c=a.i(431110),d=a.i(18170),e=a.i(56656);function f(){return(0,b.jsx)("span",{className:"text-xs text-yellow-500",children:"Unsaved changes"})}function g({isDirty:a,isLoading:f,status:g,onClick:h,disabled:i,cleanLabel:j="Save"}){return(0,b.jsxs)(d.Button,{type:"button",size:"default",variant:a?"secondary":"outline",onClick:h,disabled:f||!!i,className:a?"border-yellow-500/60 text-yellow-500 hover:bg-yellow-500/10":"cursor-pointer",children:[a&&(0,b.jsx)(c.IconAlertCircle,{className:"h-4 w-4 mr-2"}),a?"Save":j,"idle"!==g&&(0,b.jsx)("span",{className:"ml-2",children:(0,b.jsx)(e.RequestIndicator,{status:g})})]})}a.s(["UnsavedChangesBadge",()=>f,"UnsavedSaveButton",()=>g])},996159,a=>{"use strict";var b=a.i(254157),c=a.i(347421),d=a.i(778737),e=a.i(681230);function f({title:a,description:f,isDirty:g,saveStatus:h,onSave:i,showSaveButton:j=!0,children:k,deleteSection:l}){return(0,b.jsxs)("div",{className:"space-y-8",children:[(0,b.jsxs)("div",{className:"flex items-start justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{className:"text-2xl font-bold",children:a}),f&&(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:f})]}),j&&(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[g&&(0,b.jsx)(e.UnsavedChangesBadge,{}),(0,b.jsx)(e.UnsavedSaveButton,{isDirty:g,isLoading:"loading"===h,status:h,onClick:i})]})]}),(0,b.jsx)(d.Separator,{}),(0,b.jsx)(c.Card,{className:g?"border border-yellow-500/60":"border",children:(0,b.jsx)(c.CardContent,{className:"",children:k})}),l]})}a.s(["SettingsPageTemplate",()=>f])}];

//# sourceMappingURL=web_2b1cb173._.js.map