import{c as l,r as a,d as h,j as e}from"./index-DiwDH9aE.js";import{T as s}from"./triangle-alert-BxjRBxgM.js";/**
 * @license lucide-react v0.544.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const y=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],p=l("check",y);/**
 * @license lucide-react v0.544.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const v=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],N=l("trash-2",v),C=({isOpen:t,onClose:n,onConfirm:d,title:i,message:m,variant:x="danger",confirmText:b="Confirmar",cancelText:g="Cancelar",loading:o=!1})=>{if(a.useEffect(()=>{const c=f=>{f.key==="Escape"&&t&&!o&&n()};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[t,n,o]),a.useEffect(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[t]),!t)return null;const r={danger:{icon:s,iconColor:"text-red-600",iconBg:"bg-red-100",confirmBg:"bg-red-600 hover:bg-red-700"},warning:{icon:s,iconColor:"text-yellow-600",iconBg:"bg-yellow-100",confirmBg:"bg-yellow-600 hover:bg-yellow-700"},info:{icon:p,iconColor:"text-blue-600",iconBg:"bg-blue-100",confirmBg:"bg-blue-600 hover:bg-blue-700"}}[x],u=r.icon;return h.createPortal(e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm animate-fadeIn",children:e.jsxs("div",{className:"relative w-full max-w-md bg-white rounded-lg shadow-2xl animate-scaleIn",children:[e.jsxs("div",{className:"p-6",children:[e.jsx("div",{className:`mx-auto flex items-center justify-center w-12 h-12 rounded-full ${r.iconBg} mb-4`,children:e.jsx(u,{className:`w-6 h-6 ${r.iconColor}`})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 text-center mb-2",children:i}),e.jsx("p",{className:"text-sm text-gray-600 text-center",children:m})]}),e.jsxs("div",{className:"flex items-center gap-3 px-6 py-4 bg-gray-50 rounded-b-lg",children:[e.jsx("button",{onClick:n,disabled:o,className:"flex-1 px-4 py-2 text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors disabled:opacity-50",children:g}),e.jsx("button",{onClick:d,disabled:o,className:`flex-1 px-4 py-2 text-white rounded-lg transition-colors disabled:opacity-50 ${r.confirmBg}`,children:o?"Procesando...":b})]})]})}),document.body)};export{C,N as T,p as a};
