import React, { ReactNode } from 'react'; import { Layout } from '../models'; /** * Service interface for managing layout navigation elements. * Translated from NGXS LayoutState actions. */ export interface LayoutService { /** * Add one or more navigation elements to the layout. * Duplicate names are ignored. * @param elements - Single element or array of elements to add */ addNavigationElement: (elements: Layout.NavigationElement | Layout.NavigationElement[]) => void; /** * Remove a navigation element by name. * @param name - Name of the element to remove */ removeNavigationElement: (name: string) => void; /** * Clear all navigation elements. */ clearNavigationElements: () => void; } /** * Context value containing both the state and service. */ export interface LayoutContextValue { /** Current layout state */ state: Layout.State; /** Service for modifying layout state */ service: LayoutService; } export interface LayoutProviderProps { children: ReactNode; } /** * Provider component for layout state management. * Replaces NGXS LayoutState from Angular. * * @example * ```tsx * * * * ``` */ export declare function LayoutProvider({ children }: LayoutProviderProps): React.ReactElement; /** * Hook to access the full layout context (state and service). * @throws Error if used outside of LayoutProvider */ export declare function useLayoutContext(): LayoutContextValue; /** * Hook to access just the layout service for modifying state. */ export declare function useLayoutService(): LayoutService; /** * Hook to access the current navigation elements. */ export declare function useNavigationElements(): Layout.NavigationElement[];