import{c as i}from"./use-auth-wvxHCDzg.js";import{r as c,j as e}from"./index-BH-cN4KT.js";import{B as h}from"./button-ChRro_zr.js";import{T as d,A as g,e as x,f as m,g as u,h as j,i as p,j as D,k as A}from"./alert-dialog-xhdXOIPZ.js";const f=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],T=i("square-pen",f);function B({onDelete:a,title:s="Delete this item?",description:r="This action cannot be undone.",disabled:o,size:l="sm"}){const[n,t]=c.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(h,{variant:"ghost",size:l,disabled:o,onClick:()=>t(!0),"aria-label":"Delete",children:e.jsx(d,{className:"w-4 h-4"})}),e.jsx(g,{open:n,onOpenChange:t,children:e.jsxs(x,{children:[e.jsxs(m,{children:[e.jsx(u,{children:s}),e.jsx(j,{children:r})]}),e.jsxs(p,{children:[e.jsx(D,{children:"Cancel"}),e.jsx(A,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>{a(),t(!1)},children:"Delete"})]})]})})]})}export{B as D,T as S};
