import * as e from "react";
//#region node_modules/@radix-ui/react-compose-refs/dist/index.mjs
function t(e, t) {
	if (typeof e == "function") return e(t);
	e != null && (e.current = t);
}
function n(...e) {
	return (n) => {
		let r = !1, i = e.map((e) => {
			let i = t(e, n);
			return !r && typeof i == "function" && (r = !0), i;
		});
		if (r) return () => {
			for (let n = 0; n < i.length; n++) {
				let r = i[n];
				typeof r == "function" ? r() : t(e[n], null);
			}
		};
	};
}
function r(...t) {
	return e.useCallback(n(...t), t);
}
//#endregion
export { r as n, n as t };

//# sourceMappingURL=dist-CTlQcJNK.js.map