import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{Q as t}from"./vendor-charts-iXlq6Rne.js";import{t as n}from"./triangle-alert-_Trdz8l6.js";import{_ as r}from"./vendor-flow-IzlrcDx6.js";import{a as i,i as a}from"./index-HkVQGc9M.js";var o=e(t(),1),s=r();function c({isOpen:e,title:t,message:r,confirmLabel:c=`Delete`,cancelLabel:l=`Cancel`,tone:u=`danger`,isLoading:d=!1,onConfirm:f,onCancel:p}){let m=(0,s.jsx)(i,{isOpen:e,onClose:p,title:t,size:`sm`,closeOnOverlay:!d,footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a,{variant:`outline`,onClick:p,disabled:d,children:l}),(0,s.jsx)(a,{variant:u===`danger`?`danger`:`primary`,onClick:f,isLoading:d,children:c})]}),children:(0,s.jsxs)(`div`,{className:`flex items-start gap-3`,children:[u===`danger`&&(0,s.jsx)(`span`,{className:`flex-shrink-0 flex items-center justify-center w-9 h-9 rounded-full bg-red-50 dark:bg-red-950/40 text-[var(--color-error)]`,children:(0,s.jsx)(n,{className:`w-[18px] h-[18px]`})}),(0,s.jsx)(`div`,{className:`text-[13px] leading-relaxed text-[var(--color-text-secondary)]`,children:r})]})});return e?(0,o.createPortal)(m,document.body):null}export{c as t};