import { useLocation } from 'react-router-dom';
import { useMemo } from 'react';
const OneOfLocationRegex = /(?=oneof=)/g;
export function useOneOfLocationIdx(oneOf, level) {
    const location = useLocation();
    return useMemo(() => oneOf.findIndex((_, index) => {
        const result = location.hash.split(OneOfLocationRegex);
        return result[level]?.includes(`oneof=${index}`);
    }), [level, location.hash, oneOf]);
}
//# sourceMappingURL=useOneOfLocationIdx.js.map