"use client";
import { n as e } from "./useIsoLayoutEffect-CKOv1bV_.js";
import { f as t } from "./useRenderElement-CmuWsiNa.js";
//#region ../../node_modules/.bun/@base-ui+utils@0.2.9+f7941a290aa3d619/node_modules/@base-ui/utils/esm/useStableCallback.js
var n = e.useInsertionEffect, r = n && n !== e.useLayoutEffect ? n : (e) => e();
function i(e) {
	let n = t(a).current;
	return n.next = e, r(n.effect), n.trampoline;
}
function a() {
	let e = {
		next: void 0,
		callback: o,
		trampoline: (...t) => e.callback?.(...t),
		effect: () => {
			e.callback = e.next;
		}
	};
	return e;
}
function o() {
	if (process.env.NODE_ENV !== "production") throw Error("Base UI: Cannot call an event handler while rendering.");
}
//#endregion
export { i as t };
