import { jsx as t } from "react/jsx-runtime";
import { useAnimatePresence as c } from "../hooks/useAnimatePresence.js";
import n from "../components/AlertDialog/index.js";
import { useModalContext as r } from "../context/generalContext/index.js";
import "react";
import { RenderIf as m } from "../utils/components/RenderIf.js";
import "../utils/functions.js";
import { A as l } from "../index-T7wQHOux.js";
const v = ({ children: e }) => {
  const { modalInfo: o } = r();
  return /* @__PURE__ */ t(l, { children: /* @__PURE__ */ t(m, { condition: !!o, children: /* @__PURE__ */ t(n.AlertDialog, { open: !0, children: /* @__PURE__ */ t(p, { children: e }) }) }) });
}, p = ({ children: e }) => {
  const { modalInfo: o } = r(), i = { y: ["0%", "1000%", "-50%"], x: ["-50%", "-50%"], opacity: [0, 0, 1], scale: [0, 0.5, 1], transition: { duration: 0.2 } }, a = { y: ["-50%", "1000%", "0%"], x: ["-50%", "-50%"], opacity: [1, 0, 0], scale: [1, 0.5, 0], transition: { duration: 0.2 } }, { scope: s } = c({ enterAnimation: i, exitAnimation: a, enterOptions: { ease: "linear" }, exitOptions: { ease: "linear" } });
  return /* @__PURE__ */ t(n.AlertDialogContent, { className: o == null ? void 0 : o.className, ref: s, variant: { variant: "govco" }, children: e });
};
export {
  v as Modal
};
