import{jsxs as n,jsx as e}from"react/jsx-runtime";import{useState as g}from"react";import{A as D,h as p,a as u,b as A,c as m,d as C,e as f,f as v,g as b}from"./alert-dialog-xorwy8s8.js";function k({open:o,onOpenChange:r,onConfirm:i,title:a="Are you sure?",description:s="This action cannot be undone. This will permanently delete this item.",confirmLabel:c="Delete",trigger:t}){const[d,h]=g(!1),l=o!==void 0;return n(D,{open:l?o:d,onOpenChange:l?r:h,children:[t&&e(p,{asChild:!0,children:t}),n(u,{children:[n(A,{children:[e(m,{children:a}),e(C,{children:s})]}),n(f,{children:[e(v,{children:"Cancel"}),e(b,{onClick:i,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:c})]})]})]})}export{k as D};
