import{r as e,j as t}from"./vendor-react-CersLHzn.js";const a=e.memo(function({title:a="Confirmar",message:r,confirmLabel:s="Confirmar",cancelLabel:i="Volver",onConfirm:n,onClose:o,danger:d=!0,busy:l=!1,isAlert:c=!1}){return e.useEffect(()=>{const e=e=>{"Escape"===e.key&&o()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[o]),t.jsx("div",{id:"confirm-overlay",onClick:o,className:"fixed inset-0 z-[70] flex items-center justify-center bg-black/75 p-4 animate-in fade-in",children:t.jsxs("div",{id:"confirm-modal",onClick:e=>e.stopPropagation(),className:"relative w-full max-w-sm rounded-[2rem] border border-white/10 bg-gradient-to-b from-surface-800 to-surface-900 p-6 shadow-2xl shadow-brand-900/60 animate-in zoom-in-95",children:[t.jsxs("div",{className:"mb-3 flex items-center gap-3",children:[t.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-[2rem] "+(d?"bg-red-500/15 text-red-400":"bg-brand-500/15 text-brand-400"),children:t.jsx("i",{className:`fa-solid ${d?"fa-triangle-exclamation":"fa-circle-question"} text-base`})}),t.jsx("h3",{id:"confirm-title",className:"text-base font-extrabold text-white",children:a})]}),t.jsx("p",{id:"confirm-message",className:"mb-5 text-xs leading-relaxed text-gray-300",children:r}),t.jsxs("div",{className:"flex gap-2",children:[!c&&t.jsx("button",{id:"confirm-cancel",type:"button",onClick:o,disabled:l,className:"flex-1 rounded-xl border border-white/10 bg-surface-900/90 px-4 py-2.5 text-xs font-bold text-gray-300 transition-colors hover:bg-surface-600 hover:text-white disabled:opacity-60",children:i}),t.jsxs("button",{id:"confirm-accept",type:"button",onClick:n||o,disabled:l,className:"flex-1 flex items-center justify-center gap-2 rounded-xl px-4 py-2.5 text-xs font-bold text-white transition hover:scale-[1.02] active:scale-95 disabled:opacity-60 "+(d?"bg-red-500 hover:bg-red-600":"bg-brand-500 hover:bg-brand-400"),children:[l&&t.jsx("i",{className:"fa-solid fa-spinner fa-spin"}),s]})]})]})})});export{a as C};
