import{r as x,j as e}from"./vendor-tanstack-BVzzyDEt.js";import{d1 as g,d2 as u,d3 as C,d4 as m,d5 as A,j as f,ao as v,d6 as b,d7 as k,d8 as y}from"./index-BJkJ93Lr.js";const I=({isOpen:r,title:i,description:o,onConfirm:d,onClose:c,confirmText:l,isLoading:a=!1,loadingText:h="Deleting..."})=>{const[t,s]=x.useState(""),n=()=>{s(""),c()},j=()=>{d(),s("")},D=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(f,{htmlFor:"confirm-text",children:["Type ",e.jsx("strong",{children:l})," to confirm:"]}),e.jsx(v,{id:"confirm-text",value:t,onChange:p=>s(p.target.value),placeholder:l})]}),e.jsxs(b,{children:[e.jsx(k,{onClick:n,children:"Cancel"}),e.jsx(y,{variant:"destructive",onClick:j,disabled:D,children:a?h:"Delete"})]})]})})};export{I as D};
//# sourceMappingURL=delete-confirmation-dialog-Baib9xiM.js.map
