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