import { t as e } from "./utils-CHlhTiFC.js";
import { t } from "./x-C46k3qiu.js";
import { a as n, i as r, n as i, o as a, r as o, s } from "./dist-CFv9lNyL.js";
import { r as c } from "./dist-Dw21-wvw.js";
import l from "react";
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
//#region src/components/ui/dialog.tsx
var p = a, m = n, h = l.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ d(r, {
	...n,
	ref: i,
	className: e("fixed inset-0 z-50 backdrop-blur-[18px] bg-[#f7f7f7]/[.9] dark:bg-[#55606E]/[.9] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", t)
}));
h.displayName = r.displayName;
var g = l.forwardRef(({ className: t, children: n, onOpenChange: r, inPortal: a = !1, overlayClassName: o, ...s }, c) => {
	let l = /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(h, {
		onClick: () => r?.(!1),
		className: o
	}), /* @__PURE__ */ d(i, {
		...s,
		ref: c,
		className: e("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg max-h-[90vh] overflow-auto translate-x-[-50%] translate-y-[-50%] gap-4 border border-primary-gray-200 bg-primary-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", t),
		children: n
	})] });
	return a ? /* @__PURE__ */ d(m, {
		"data-slot": "drawer-portal",
		children: l
	}) : l;
});
g.displayName = i.displayName;
function _({ className: t, ...n }) {
	return /* @__PURE__ */ d("div", {
		...n,
		className: e("flex flex-col gap-1.5 text-center sm:text-left", t)
	});
}
_.displayName = "DialogHeader";
function v({ className: e, children: t, ...n }) {
	return /* @__PURE__ */ d("div", {
		...n,
		className: e,
		children: t
	});
}
v.displayName = "DialogFooter";
var y = l.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ d(s, {
	...n,
	ref: r,
	className: e("mb-0 p-0 text-[1.563rem] md:text-[2.188rem] font-normal leading-[1.15] text-primary-black dark:text-primary-white", t)
}));
y.displayName = s.displayName;
var b = l.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ d(o, {
	...n,
	ref: r,
	className: e("text-sm text-primary-gray-600 dark:text-primary-gray-300 m-0", t)
}));
b.displayName = o.displayName;
//#endregion
//#region src/components/ui/modal.tsx
function x(n) {
	let { title: r, description: i, children: a, footer: o, open: s, onClose: u, className: m, titleClassName: h, footerClassName: x, descriptionClassName: S, overlayClassName: C, closeButtonClassName: w, showCloseButton: T = !0, inPortal: E = !1 } = n, D = l.useId(), O = l.useId();
	return /* @__PURE__ */ d(p, {
		open: s,
		onOpenChange: (e) => {
			e || u?.();
		},
		children: /* @__PURE__ */ f(g, {
			inPortal: E,
			className: e("rounded-none p-16 max-w-(--breakpoint-xl) undp-scrollbar", "data-[state=open]:animate-in data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "data-[state=closed]:slide-out-to-top-[2%] data-[state=open]:slide-in-from-top-[2%]", m),
			overlayClassName: C,
			onOpenChange: (e) => {
				e || u?.();
			},
			"aria-describedby": i ? D : void 0,
			"aria-labelledby": r ? O : void 0,
			children: [
				T && /* @__PURE__ */ d("button", {
					type: "button",
					onClick: () => {
						u?.();
					},
					className: e("absolute right-6 top-6 p-2 bg-primary-gray-200 dark:bg-primary-gray-600 rounded-full ring-offset-background transition-opacity hover:bg-primary-gray-300 dark:hover:bg-primary-gray-500 disabled:pointer-events-none data-[state=open]:bg-primary-gray-200 dark:data-[state=open]:bg-primary-gray-600 data-[state=open]:text-primary-gray-600", w),
					children: /* @__PURE__ */ d(t, { className: "h-6 w-6 stroke-primary-black dark:stroke-primary-gray-100" })
				}),
				r || i ? /* @__PURE__ */ f(_, { children: [r && /* @__PURE__ */ d(y, {
					id: O,
					className: h,
					children: r
				}), i && /* @__PURE__ */ d(b, {
					className: S,
					id: D,
					children: i
				})] }) : /* @__PURE__ */ d(c, { children: /* @__PURE__ */ d(y, { children: "This a modal" }) }),
				a,
				o && /* @__PURE__ */ d(v, {
					className: x,
					children: o
				})
			]
		})
	});
}
//#endregion
export { x as t };

//# sourceMappingURL=modal-Bk1jTp7c.js.map