import { ReactNode } from 'react';
export type Side = 'left' | 'top' | 'right' | 'bottom';
/** Callback to dismiss an overlay panel */
export type OverlayDismissCallback = () => void;
/** Actions context - stable functions that don't change */
export interface LayoutActionsContextValue {
    registerPanel: (side: Side, size: number) => void;
    unregisterPanel: (side: Side) => void;
    updatePanelSize: (side: Side, size: number) => void;
    setDragging: (isDragging: boolean) => void;
    markReady: () => void;
    /** Register an overlay panel's dismiss callback. Returns unregister function. */
    registerOverlayPanel: (dismiss: OverlayDismissCallback) => () => void;
    /** Dismiss all overlay panels */
    dismissOverlayPanels: () => void;
    /** Whether transitions are enabled for panels */
    hasTransition: boolean;
    /** Subscribe to panel sizes changes (for useSyncExternalStore) */
    subscribeToPanelSizes: (callback: () => void) => () => void;
    /** Get current panel sizes snapshot */
    getPanelSizes: () => Record<Side, number>;
}
/** State context - reactive state that triggers re-renders */
export interface LayoutStateContextValue {
    panelSizes: Record<Side, number>;
    isDragging: boolean;
    isReady: boolean;
    hasOverlayPanels: boolean;
}
/** Combined context value for backwards compatibility */
export interface LayoutContextValue extends LayoutActionsContextValue, LayoutStateContextValue {
}
export declare const LayoutActionsContext: import("react").Context<LayoutActionsContextValue | null>;
export declare const LayoutStateContext: import("react").Context<LayoutStateContextValue | null>;
/** @deprecated Use useLayoutActionsContext and useLayoutStateContext separately */
export declare const LayoutContext: import("react").Context<LayoutContextValue | null>;
export declare function useLayoutActionsContext(): LayoutActionsContextValue | null;
export declare function useLayoutStateContext(): LayoutStateContextValue | null;
export declare function useLayoutContext(): LayoutContextValue | null;
/**
 * Hook to get panel sizes without causing re-renders on every size change.
 * Uses useSyncExternalStore for efficient subscriptions.
 */
export declare function usePanelSizes(): Record<Side, number>;
export interface LayoutProviderProps {
    children: ReactNode;
    /** Whether transitions are enabled for panels */
    hasTransition?: boolean;
}
export declare function LayoutProvider({ children, hasTransition, }: LayoutProviderProps): import("react/jsx-runtime").JSX.Element;
/**
 * Provider that resets the layout context for sub-components.
 * Used to prevent panels in nested Layouts from affecting parent layouts.
 */
export declare function LayoutContextReset({ children }: {
    children: ReactNode;
}): import("react/jsx-runtime").JSX.Element;
export interface LayoutPanelContextValue {
    /** Callback to change the panel's open state */
    onOpenChange: (isOpen: boolean) => void;
    /** Current open state of the panel */
    isOpen: boolean;
}
export declare const LayoutPanelContext: import("react").Context<LayoutPanelContextValue | null>;
export declare function useLayoutPanelContext(): LayoutPanelContextValue | null;
