"use strict";const e=require("react/jsx-runtime"),m=require("react-i18next"),n=require("lucide-react"),u={danger:{iconColor:"text-red-500",buttonColor:"bg-red-600 hover:bg-red-700",iconBg:"bg-red-500/10"},warning:{iconColor:"text-amber-500",buttonColor:"bg-amber-600 hover:bg-amber-700",iconBg:"bg-amber-500/10"},info:{iconColor:"text-[var(--color-accent-500)]",buttonColor:"bg-[var(--color-accent-600)] hover:bg-[var(--color-accent-700)]",iconBg:"bg-[var(--color-accent-500)]/10"}};function v({isOpen:s,title:c,message:i,confirmLabel:l,cancelLabel:d,variant:x="warning",loading:r=!1,onConfirm:b,onCancel:a}){const{t}=m.useTranslation("common"),o=u[x];return s?e.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm",children:e.jsxs("div",{className:"relative w-full max-w-md bg-[var(--bg-card)] rounded-2xl shadow-2xl border border-[var(--border-color)] overflow-hidden animate-in fade-in zoom-in duration-200",children:[e.jsx("button",{onClick:a,disabled:r,className:"absolute top-4 right-4 p-1.5 rounded-lg text-[var(--text-tertiary)] hover:text-[var(--text-primary)] hover:bg-[var(--bg-hover)] transition-colors disabled:opacity-50",children:e.jsx(n.X,{className:"w-5 h-5"})}),e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex flex-col items-center text-center mb-6",children:[e.jsx("div",{className:`w-14 h-14 rounded-full ${o.iconBg} flex items-center justify-center mb-4`,children:e.jsx(n.AlertTriangle,{className:`w-7 h-7 ${o.iconColor}`})}),e.jsx("h2",{className:"text-xl font-semibold text-[var(--text-primary)] mb-2",children:c}),e.jsx("div",{className:"text-[var(--text-secondary)]",children:i})]}),e.jsxs("div",{className:"flex flex-col-reverse sm:flex-row gap-3",children:[e.jsx("button",{onClick:a,disabled:r,className:"flex-1 flex items-center justify-center gap-2 px-6 py-3 rounded-xl border border-[var(--border-color)] text-[var(--text-secondary)] hover:bg-[var(--bg-hover)] transition-all font-medium disabled:opacity-50",children:d||t("cancel")}),e.jsx("button",{onClick:b,disabled:r,className:`flex-1 flex items-center justify-center gap-2 px-6 py-3 rounded-xl text-white font-medium transition-all disabled:opacity-50 ${o.buttonColor}`,children:r?e.jsxs(e.Fragment,{children:[e.jsx(n.Loader2,{className:"w-4 h-4 animate-spin"}),t("processing")]}):l||t("confirm")})]})]})]})}):null}exports.ConfirmModal=v;
//# sourceMappingURL=ConfirmModal-CYWRiVoD.js.map
