import{j as e,w as d}from"./index-Cc987VYg.js";import{A as u,a as f,b as x,c as g,C as h,d as j,e as m,f as p,g as A}from"./alert-dialog-B3eNId11.js";import{X as D}from"./separator-D14BnWPe.js";function y({open:i,onOpenChange:s,onConfirm:t,title:l="Are you sure?",description:o="This action cannot be undone.",confirmText:n="Delete",cancelText:a="Cancel",variant:c="destructive",loading:r=!1}){return e.jsx(u,{open:i,onOpenChange:s,children:e.jsxs(f,{children:[e.jsxs(x,{children:[e.jsx(g,{children:l}),e.jsxs(h,{onClick:()=>s(!1),className:"rounded-full w-[30px] h-[30px] flex items-center justify-center opacity-70 hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none border-0 bg-transparent p-0",children:[e.jsx(D,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]}),e.jsx(j,{children:o}),e.jsxs(m,{children:[e.jsx(p,{onClick:t,disabled:r,className:d(c==="destructive"&&"bg-destructive text-destructive-foreground hover:bg-destructive/90"),children:n}),e.jsx(A,{disabled:r,children:a})]})]})})}export{y as C};
