import { jsx as t } from "react/jsx-runtime";
import { useAnimatePresence as s } from "../hooks/useAnimatePresence.js";
import i from "../components/AlertDialog/index.js";
import { useModalContext as e } from "../context/generalContext/index.js";
import "react";
import { RenderIf as p } from "../utils/components/RenderIf.js";
import "../utils/functions.js";
import { A as c } from "../index-T7wQHOux.js";
import "../SVGVisualElement-aqO4D4Z5.js";
import "../use-unmount-effect-Wy5iLAex.js";
import "react-dom";
import "../components/Icons.js";
import "../clsx-7d8NmkQq.js";
import "../components/AlertDialog/variants.js";
import "../index-xVF7D3FM.js";
import "../context/index.js";
import "../LayoutGroupContext-3euHzeKi.js";
const I = ({ children: r }) => {
  const { modalInfo: o } = e();
  return /* @__PURE__ */ t(c, { children: /* @__PURE__ */ t(p, { condition: !!o, children: /* @__PURE__ */ t(i.AlertDialog, { open: !0, children: /* @__PURE__ */ t(l, { children: r }) }) }) });
}, l = ({ children: r }) => {
  const { modalInfo: o } = e(), n = { 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: m } = s({ enterAnimation: n, exitAnimation: a, enterOptions: { ease: "linear" }, exitOptions: { ease: "linear" } });
  return /* @__PURE__ */ t(i.AlertDialogContent, { className: o == null ? void 0 : o.className, ref: m, variant: { variant: "govco" }, children: r });
};
export {
  I as Modal
};
