import{r as j,j as e}from"./vendor-tanstack-BpuysabX.js";import{cu as D,cv as u,cw as g,cx as C,cy as m,i as A,p as v,cz as f,cA as b,q as y}from"./index-CREafGO4.js";const F=({isOpen:r,title:i,description:o,onConfirm:c,onClose:d,confirmText:l,isLoading:s=!1})=>{const[t,a]=j.useState(""),n=()=>{a(""),d()},h=()=>{c(),a("")},p=s||!!l&&t!==l;return e.jsx(D,{open:r,onOpenChange:n,children:e.jsxs(u,{children:[e.jsxs(g,{children:[e.jsx(C,{children:i}),e.jsx(m,{children:o})]}),l&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs(A,{htmlFor:"confirm-text",children:["Type ",e.jsx("strong",{children:l})," to confirm:"]}),e.jsx(v,{id:"confirm-text",value:t,onChange:x=>a(x.target.value),placeholder:l})]}),e.jsxs(f,{children:[e.jsx(b,{onClick:n,children:"Cancel"}),e.jsx(y,{variant:"destructive",onClick:h,disabled:p,loading:s,"aria-label":s?"Deleting":void 0,children:"Delete"})]})]})})};export{F as D};
//# sourceMappingURL=delete-confirmation-dialog-DxI68qN2.js.map
