import { MutableRefObject, ReactNode } from 'react';
export type Side = 'left' | 'top' | 'right' | 'bottom';
/**
 * Refs context - stable refs that don't change and don't trigger re-renders.
 * Provides portal container ref for panels to render into.
 */
export interface LayoutRefsContextValue {
    /** Container element ref for panels to portal into */
    panelContainerRef: MutableRefObject<HTMLDivElement | null>;
    /** Whether the panel container is mounted and ready for portals */
    isPanelContainerReady: boolean;
    /** Callback ref to set on the panel container element */
    setPanelContainer: (element: HTMLDivElement | null) => void;
}
export declare const LayoutRefsContext: import("react").Context<LayoutRefsContextValue | null>;
export declare function useLayoutRefsContext(): LayoutRefsContextValue | null;
/** Callback to dismiss an overlay panel */
export type OverlayDismissCallback = () => void;
/**
 * Actions context - stable functions and configuration that don't change.
 * Separating these from state prevents unnecessary re-renders when only state changes.
 */
export interface LayoutActionsContextValue {
    /** Register a panel on a specific side with initial size */
    registerPanel: (side: Side, size: number) => void;
    /** Unregister a panel from a specific side */
    unregisterPanel: (side: Side) => void;
    /** Update the size of a registered panel */
    updatePanelSize: (side: Side, size: number) => void;
    /** Set global dragging state (when any panel is being resized) */
    setDragging: (isDragging: boolean) => void;
    /** Mark the layout as ready (after initial mount) */
    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 (stable config value) */
    hasTransition: boolean;
}
/** State context - reactive state that triggers re-renders */
export interface LayoutStateContextValue {
    panelSizes: Record<Side, number>;
    isDragging: boolean;
    isReady: boolean;
    hasOverlayPanels: boolean;
}
export declare const LayoutActionsContext: import("react").Context<LayoutActionsContextValue | null>;
export declare const LayoutStateContext: import("react").Context<LayoutStateContextValue | null>;
export declare function useLayoutActionsContext(): LayoutActionsContextValue | null;
export declare function useLayoutStateContext(): LayoutStateContextValue | null;
/** Combined layout context value for convenience */
export interface LayoutContextValue extends LayoutActionsContextValue, LayoutStateContextValue, LayoutRefsContextValue {
}
/**
 * Combined hook that returns all layout context values.
 * Convenience wrapper around the individual context hooks.
 * Returns null if used outside of a Layout component.
 */
export declare function useLayoutContext(): LayoutContextValue | null;
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;
