import { LayoutMode, UseLayoutModeReturn } from '../types';
/**
* Options for useLayoutMode hook.
*/
export interface UseLayoutModeOptions {
/** Initial layout mode */
initialMode?: LayoutMode;
/** Callback when mode changes */
onChange?: (mode: LayoutMode, previousMode: LayoutMode | null) => void;
/** Whether to start in locked mode */
initiallyLocked?: boolean;
}
/**
* Hook for managing layout mode with locking capabilities.
*
* @param options - Hook configuration options
* @returns Layout mode state and controls
*
* @example
* ```tsx
* function LayoutControls() {
* const {
* mode,
* previousMode,
* setMode,
* isLocked,
* lockMode,
* unlockMode
* } = useLayoutMode({
* initialMode: 'grid',
* onChange: (mode) => console.log('Mode changed to:', mode)
* });
*
* return (
*
*
*
*
* );
* }
* ```
*/
export declare function useLayoutMode(options?: UseLayoutModeOptions): UseLayoutModeReturn;
/**
* Hook that returns true when layout mode matches the specified mode.
*
* @param targetMode - The mode to check against
* @param currentMode - The current layout mode
* @returns Whether the current mode matches the target
*
* @example
* ```tsx
* function GridOnlyContent({ currentMode }: { currentMode: LayoutMode }) {
* const isGrid = useIsLayoutMode('grid', currentMode);
*
* if (!isGrid) return null;
*
* return ;
* }
* ```
*/
export declare function useIsLayoutMode(targetMode: LayoutMode, currentMode: LayoutMode): boolean;
/**
* Hook that returns the appropriate value based on current layout mode.
*
* @param modeValues - Object mapping layout modes to values
* @param currentMode - The current layout mode
* @param defaultValue - Default value if mode not found
* @returns The value for the current mode
*
* @example
* ```tsx
* function AdaptiveComponent({ currentMode }: { currentMode: LayoutMode }) {
* const columns = useLayoutModeValue(
* {
* grid: 4,
* list: 1,
* compact: 6,
* expanded: 2,
* dense: 8,
* sparse: 1,
* },
* currentMode,
* 3
* );
*
* return {children};
* }
* ```
*/
export declare function useLayoutModeValue(modeValues: Partial>, currentMode: LayoutMode, defaultValue: T): T;
export type { UseLayoutModeReturn };