import { default as React, ReactNode } from 'react'; import { Theme } from '@principal-ade/industry-theme'; import { PanelLayout } from './PanelConfigurator'; /** * Imperative handle for ConfigurablePanelLayout * Allows programmatic control of panel sizes without remounting */ export interface ConfigurablePanelLayoutHandle { /** * Set panel sizes programmatically without remounting * @param sizes - Object with left, middle, and right sizes (0-100, should sum to 100) */ setLayout: (sizes: { left: number; middle: number; right: number; }) => void; /** * Collapse a specific panel */ collapsePanel: (panel: 'left' | 'right') => void; /** * Expand a specific panel */ expandPanel: (panel: 'left' | 'right') => void; /** * Get current panel sizes * @returns Object with left, middle, and right sizes */ getLayout: () => { left: number; middle: number; right: number; }; } export interface PanelDefinitionWithContent { id: string; label: string; content: ReactNode; preview?: ReactNode; icon?: ReactNode; } export interface ConfigurablePanelLayoutProps { /** Available panels with their content */ panels: PanelDefinitionWithContent[]; /** Current layout configuration - omit or set positions to null/undefined for two-panel layouts */ layout: PanelLayout; /** Custom data attributes for slot identification (for edit mode) */ slotDataAttributes?: { left?: Record; middle?: Record; right?: Record; }; /** Which panels are collapsible - only specify for active panels */ collapsiblePanels?: { left?: boolean; middle?: boolean; right?: boolean; }; /** Default sizes for each panel (0-100, should sum to 100 for active panels) - only specify for active panels */ defaultSizes?: { left?: number; middle?: number; right?: number; }; /** CSS class for the layout container */ className?: string; /** Initial collapsed state for panels */ collapsed?: { left?: boolean; middle?: boolean; right?: boolean; }; /** Additional styles to apply to the container */ style?: React.CSSProperties; /** Whether to show collapse/expand toggle buttons */ showCollapseButtons?: boolean; /** Animation duration in milliseconds */ animationDuration?: number; /** Animation easing function */ animationEasing?: string; /** Theme object for customizing colors */ theme: Theme; /** Callbacks for panel events */ onLeftCollapseStart?: () => void; onLeftCollapseComplete?: () => void; onLeftExpandStart?: () => void; onLeftExpandComplete?: () => void; onMiddleCollapseStart?: () => void; onMiddleCollapseComplete?: () => void; onMiddleExpandStart?: () => void; onMiddleExpandComplete?: () => void; onRightCollapseStart?: () => void; onRightCollapseComplete?: () => void; onRightExpandStart?: () => void; onRightExpandComplete?: () => void; onPanelResize?: (sizes: { left: number; middle: number; right: number; }) => void; } /** * ConfigurablePanelLayout - A flexible panel layout that supports 2 or 3 panels * * Supports both two-panel and three-panel layouts: * - For two panels: omit or set unused positions to null/undefined (e.g., { left: 'panel1', right: 'panel2' }) * - For three panels: define all positions (e.g., { left: 'panel1', middle: 'panel2', right: 'panel3' }) * * The component automatically adjusts sizing and behavior based on active panels. * * @example * // Using the imperative API to set sizes without remounting * const layoutRef = useRef(null); * * // Later, to change sizes: * layoutRef.current?.setLayout({ left: 0, middle: 50, right: 50 }); */ export declare const ConfigurablePanelLayout: React.ForwardRefExoticComponent>; //# sourceMappingURL=ConfigurablePanelLayout.d.ts.map