import { useWixPatternsRouter } from '../../providers/WixPatternsRouterProvider';
export const usePatternsNavigate = () => {
    const router = useWixPatternsRouter();
    if (!router) {
        throw new Error('usePatternsNavigate must be used within PatternsRouter');
    }
    return {
        navigateToEntityPage: ({ path, entity }) => {
            router.navigate(path, { state: { _chosenEntity: { entity } } });
        },
        navigateToCollectionPage: ({ path }) => {
            router.navigate(path, { state: null });
        },
    };
};
export { useWixPatternsRouter } from '../../providers/WixPatternsRouterProvider';
//# sourceMappingURL=usePatternsNavigate.js.map