import { useCallback } from 'react';
export function useMergeRefs(...refs) {
    return useCallback((node) => {
        refs.forEach((ref) => {
            if (!ref)
                return;
            if (typeof ref === 'function') {
                ref(node);
            }
            else if (ref && 'current' in ref) {
                ref.current = node;
            }
        });
    }, [refs]);
}
//# sourceMappingURL=useMergeRefs.js.map