import { jsx as e, jsxs as r, Fragment as x } from "react/jsx-runtime";
import { useTranslation as f } from "react-i18next";
import { X as v, AlertTriangle as g, Loader2 as h } from "lucide-react";
const 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 C({
  isOpen: l,
  title: i,
  message: c,
  confirmLabel: s,
  cancelLabel: d,
  variant: m = "warning",
  loading: o = !1,
  onConfirm: b,
  onCancel: n
}) {
  const { t } = f("common"), a = u[m];
  return l ? /* @__PURE__ */ e("div", { className: "fixed inset-0 z-[100] flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm", children: /* @__PURE__ */ r("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: [
    /* @__PURE__ */ e(
      "button",
      {
        onClick: n,
        disabled: o,
        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: /* @__PURE__ */ e(v, { className: "w-5 h-5" })
      }
    ),
    /* @__PURE__ */ r("div", { className: "p-6", children: [
      /* @__PURE__ */ r("div", { className: "flex flex-col items-center text-center mb-6", children: [
        /* @__PURE__ */ e("div", { className: `w-14 h-14 rounded-full ${a.iconBg} flex items-center justify-center mb-4`, children: /* @__PURE__ */ e(g, { className: `w-7 h-7 ${a.iconColor}` }) }),
        /* @__PURE__ */ e("h2", { className: "text-xl font-semibold text-[var(--text-primary)] mb-2", children: i }),
        /* @__PURE__ */ e("div", { className: "text-[var(--text-secondary)]", children: c })
      ] }),
      /* @__PURE__ */ r("div", { className: "flex flex-col-reverse sm:flex-row gap-3", children: [
        /* @__PURE__ */ e(
          "button",
          {
            onClick: n,
            disabled: o,
            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")
          }
        ),
        /* @__PURE__ */ e(
          "button",
          {
            onClick: b,
            disabled: o,
            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 ${a.buttonColor}`,
            children: o ? /* @__PURE__ */ r(x, { children: [
              /* @__PURE__ */ e(h, { className: "w-4 h-4 animate-spin" }),
              t("processing")
            ] }) : s || t("confirm")
          }
        )
      ] })
    ] })
  ] }) }) : null;
}
export {
  C
};
//# sourceMappingURL=ConfirmModal-BEfzLWOz.js.map
