import React, { createContext, useMemo, useState } from 'react';
export var BlockNavigationContext = createContext({
    isNavigationBlocked: false,
    setIsNavigationBlocked: function () { }
});
BlockNavigationContext.displayName = 'BlockNavigationContext';
export var BlockNavigationContextProvider = function (_a) {
    var children = _a.children;
    var _b = useState(false), isNavigationBlocked = _b[0], setIsNavigationBlocked = _b[1];
    var contextValue = useMemo(function () { return ({ isNavigationBlocked: isNavigationBlocked, setIsNavigationBlocked: setIsNavigationBlocked }); }, [isNavigationBlocked]);
    return React.createElement(BlockNavigationContext.Provider, { value: contextValue }, children);
};
