export function mergeRefs(...refs) {
    return (val)=>{
        setRefList(val, ...refs);
    };
}
export function setRefList(val, ...refs) {
    refs.forEach((ref)=>{
        if (typeof ref === 'function') {
            ref(val);
        }
        if (ref != null && typeof ref !== 'function') {
            ref.current = val;
        }
    });
}
