import { ReactElement } from 'react'; import { MatchResult } from '../../utils/matchPath'; import { SwitchRouteProps } from './useSwitchUtils'; export type UseSwitchProps = { children: Array> | ReactElement; }; export type UseSwitchResultMatch = { currentIndex: null | number; match: MatchResult> | null; }; /** * Returns the first children component with props `path`, `search`, `to/from` that matches the current location or without previous props. */ export declare const useSwitch: ({ children }: UseSwitchProps) => ReactElement | UseSwitchResultMatch;