import { createContext } from 'react'; import { TOptions } from './types'; export const DEFAULT_LAYOUT_INITIAL_VALUE:ContextValue = { toggleCompactSidebar: () => {}, toggleMobileSidebar: () => {}, options: null, appKey: '', data: { isWidthMode: false, isOpenMobileSidebar: false, }, }; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore export default createContext(DEFAULT_LAYOUT_INITIAL_VALUE); export interface ContextValue { appKey: string; data: StateValue; options: TOptions | null; toggleCompactSidebar(): any; // Переключение сайдбара toggleMobileSidebar(v?: boolean): any; // Переключение мобильного меню } export interface StateValue { isWidthMode: boolean; isOpenMobileSidebar: boolean; }