require("./chunk-CKQMccvm.cjs");
let react = require("react");
//#region src/internalUtils/ref.ts
/**
* Assigns a value to a ref.
* Handles both callback refs and ref objects safely.
*
* @template T - The type of the ref value
* @param ref - The ref to assign the value to (can be callback, ref object, or null)
* @param value - The value to assign
*/
const assignRef = (ref, value) => {
	if (typeof ref === "function") ref(value);
	else if (ref) ref.current = value;
};
//#endregion
//#region src/hooks/useMultipleRefs.ts
/**
* Custom hook to merge multiple refs into a single ref callback.
*
* @template T - The type of element the ref will reference
* @param refs - Any number of refs or ref functions to merge
* @returns A callback ref that assigns the value to all provided refs
*/
const useMultipleRefs = (...refs) => {
	return (0, react.useCallback)((value) => {
		refs.forEach((ref) => {
			assignRef(ref, value);
		});
	}, [refs]);
};
//#endregion
Object.defineProperty(exports, "useMultipleRefs", {
	enumerable: true,
	get: function() {
		return useMultipleRefs;
	}
});

//# sourceMappingURL=useMultipleRefs-mSvva-CV.cjs.map