Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require("../chunk-BN4qSVkS.cjs");
let react = require("react");
//#region src/hooks/useLiveRef.tsx
const defaultRef = { current: null };
function useLiveRef() {
	const [ready, setReady] = (0, react.useState)(false);
	const ref = (0, react.useRef)(null);
	const refCb = (0, react.useCallback)((node) => {
		if (node !== null) {
			ref.current = node;
			setReady(true);
		}
	}, []);
	return (0, react.useMemo)(() => [ready ? ref : defaultRef, refCb], [
		ready,
		ref,
		refCb
	]);
}
//#endregion
exports.useLiveRef = useLiveRef;
