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