import React, { createContext, useContext, useState } from 'react';
import { WixPatternsRouterState } from '../state/WixPatternsRouterState';
import { useWixPatternsContainer } from '@wix/bex-core/react';
export const WixPatternsRouterContext = createContext(null);
export const WixPatternsRouterProvider = ({ children, }) => {
    const container = useWixPatternsContainer();
    const [routerState] = useState(() => new WixPatternsRouterState({ container, navigate: () => { } }));
    return (React.createElement(WixPatternsRouterContext.Provider, { value: routerState }, children));
};
export const useWixPatternsRouter = () => useContext(WixPatternsRouterContext);
//# sourceMappingURL=WixPatternsRouterProvider.js.map