import { BrowserRouter, HashRouter, MemoryRouter } from 'react-router-dom';
const RouterComponent = {
    history: BrowserRouter,
    memory: MemoryRouter,
    hash: HashRouter,
};
export const useRouter = (router, basePath) => {
    const Router = RouterComponent[router];
    const routerProps = {
        ...(router !== 'memory' && { basename: basePath }),
    };
    return {
        Router,
        routerProps,
    };
};
//# sourceMappingURL=useRouter.js.map