import { createContext, useContext } from 'react'; export type SizeLayout = { sidebar: string; contextualBar: string; } export type LayoutContextValue = { isEmbedded: boolean; showTopNavbarEmbeddedLayout: boolean; isMobile: boolean; sidebar: any; size: SizeLayout; contextualBarExpanded: boolean; contextualBarPosition: 'absolute' | 'relative' | 'fixed'; } export const LayoutContext = createContext({ isEmbedded: false, showTopNavbarEmbeddedLayout: false, isMobile: false, sidebar: {}, size: { sidebar: '380px', contextualBar: '380px', }, contextualBarPosition: 'relative', contextualBarExpanded: false, }); export const useLayout = (): LayoutContextValue => useContext(LayoutContext);