import { useCallback as e } from "react";
import { jsx as t } from "react/jsx-runtime";
import { FloatingFocusManager as n, FloatingOverlay as r, FloatingPortal as i, useDismiss as a, useFloating as o, useInteractions as s, useRole as c } from "@floating-ui/react";
var l = {
	overlay: "fY8BBX",
	panel: "M9Yms2"
};
//#endregion
//#region src/fullscreen-portal/FullscreenPortal.tsx
function u(e, t) {
	let n = e.trim();
	return n ? `${n}. ${t}` : t;
}
function d({ open: d, title: f, description: p, onOpenChange: m, children: h }) {
	let { refs: g, context: _ } = o({
		open: d,
		onOpenChange: m
	}), v = a(_, { outsidePress: !1 }), y = c(_, { role: "dialog" }), { getFloatingProps: b } = s([v, y]), x = e((e) => {
		g.setFloating(e);
	}, [g]);
	return d ? /* @__PURE__ */ t(i, { children: /* @__PURE__ */ t(r, {
		lockScroll: !0,
		className: l.overlay,
		children: /* @__PURE__ */ t(n, {
			context: _,
			modal: !1,
			returnFocus: !0,
			children: /* @__PURE__ */ t("section", {
				ref: x,
				...b({
					className: l.panel,
					"aria-label": u(f, p)
				}),
				children: h
			})
		})
	}) }) : null;
}
//#endregion
export { d as FullscreenPortal };

//# sourceMappingURL=index.js.map