import { o as e } from "./useRenderElement-CmuWsiNa.js";
import { C as t, _ as n, o as r } from "./popupStateMapping-PdIQcWEz.js";
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/floating-ui-react/utils/getEmptyRootContext.js
function i() {
	return new n({
		open: !1,
		transitionStatus: void 0,
		floatingElement: null,
		referenceElement: null,
		triggerElements: new r(),
		floatingId: void 0,
		syncOnly: !1,
		nested: !1,
		onOpenChange: void 0
	});
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/utils/popups/store.js
function a() {
	return {
		open: !1,
		openProp: void 0,
		mounted: !1,
		transitionStatus: void 0,
		floatingRootContext: i(),
		floatingId: void 0,
		triggerCount: 0,
		preventUnmountingOnClose: !1,
		payload: void 0,
		activeTriggerId: null,
		activeTriggerElement: null,
		triggerIdProp: void 0,
		popupElement: null,
		positionerElement: null,
		activeTriggerProps: e,
		inactiveTriggerProps: e,
		popupProps: e
	};
}
function o(e, t, r = !1) {
	return new n({
		open: !1,
		transitionStatus: void 0,
		floatingElement: null,
		referenceElement: null,
		triggerElements: e,
		floatingId: t,
		syncOnly: !0,
		nested: r,
		onOpenChange: void 0
	});
}
var s = t((e) => e.triggerIdProp ?? e.activeTriggerId), c = t((e) => e.openProp ?? e.open), l = t((e) => (e.popupElement?.id ?? e.floatingId) || void 0);
function u(e, t) {
	return t !== void 0 && c(e) && s(e) === t;
}
function d(e, t) {
	return u(e, t) ? !0 : t !== void 0 && c(e) && s(e) == null && e.triggerCount === 1;
}
var f = {
	open: c,
	mounted: t((e) => e.mounted),
	transitionStatus: t((e) => e.transitionStatus),
	floatingRootContext: t((e) => e.floatingRootContext),
	triggerCount: t((e) => e.triggerCount),
	preventUnmountingOnClose: t((e) => e.preventUnmountingOnClose),
	payload: t((e) => e.payload),
	activeTriggerId: s,
	activeTriggerElement: t((e) => e.mounted ? e.activeTriggerElement : null),
	popupId: l,
	isTriggerActive: t((e, t) => t !== void 0 && s(e) === t),
	isOpenedByTrigger: t((e, t) => u(e, t)),
	isMountedByTrigger: t((e, t) => t !== void 0 && s(e) === t && e.mounted),
	triggerProps: t((e, t) => t ? e.activeTriggerProps : e.inactiveTriggerProps),
	triggerPopupId: t((e, t) => d(e, t) ? l(e) : void 0),
	popupProps: t((e) => e.popupProps),
	popupElement: t((e) => e.popupElement),
	positionerElement: t((e) => e.positionerElement)
};
//#endregion
export { o as n, f as r, a as t };
