import React from 'react' import type { SubNavigationContextType } from './types' const error = 'Cannot use SubNavigationContext without a provider' const errorHandler = () => { throw new Error(error) } export const SubNavigationContext = React.createContext({ registerIndexes: errorHandler, registeredIndexes: 0, setRendererWantsToDisplayFocusStyles: errorHandler, currentSubFocusIndex: 0, hasFocus: false, setCurrentSubFocusIndex: errorHandler, })