import { jsx as t, jsxs as l } from "react/jsx-runtime";
import { useCallback as o } from "react";
import { Dialog as D, DialogContent as b, DialogHeader as f, DialogTitle as m, DialogDescription as v, DialogFooter as k } from "../dialog/DialogPrimitive.js";
import c from "../button/Button.js";
const B = ({
  isOpen: s = !1,
  title: p,
  description: i,
  ctaLabel: n,
  cancelText: d,
  isDestructive: g,
  onAccept: e,
  onCancel: a
}) => {
  const h = o(() => {
    e == null || e();
  }, [e]), r = o(() => {
    a == null || a();
  }, [a]);
  return /* @__PURE__ */ t(
    D,
    {
      open: s,
      onOpenChange: (u) => {
        u || r();
      },
      children: /* @__PURE__ */ l(b, { hasCloseButton: !1, children: [
        /* @__PURE__ */ l(f, { children: [
          /* @__PURE__ */ t(m, { children: p }),
          i && /* @__PURE__ */ t(v, { children: i })
        ] }),
        /* @__PURE__ */ l(k, { className: "gap-[var(--spacing-2)] mt-[var(--spacing-4)]", children: [
          /* @__PURE__ */ t(c, { type: "button", label: d, variant: "outline", onClick: r }),
          /* @__PURE__ */ t(c, { type: "button", label: n, variant: g ? "destructive" : "default", onClick: h })
        ] })
      ] })
    }
  );
};
export {
  B as default
};
//# sourceMappingURL=AlertDialog.js.map
