import { StylableComponentProps } from '../theme' export interface PanelProps extends StylableComponentProps { id: string defaultIntervals: number[] layout: 'columns' | 'rows' separatorWidth?: number } export interface PanelComponentProps extends PanelProps { panelInit: (a: string, b: number[]) => PanelInitAction panelDestroy: (a: string) => PanelDestroyAction panelResizeStart: (a: string, b: number) => PanelResizeStartAction panelResize: (a: string, b: number[]) => PanelResizeAction panelResizeStop: (a: string) => PanelResizeStopAction panel: PanelState } export interface Constraints { start: number end: number } export interface PanelState { dragging: boolean intervals: number[], idx: number } export interface PanelInitAction { type: '@@cosmo-ui/PANEL_INIT' id: string intervals: number[] } export interface PanelDestroyAction { type: '@@cosmo-ui/PANEL_DESTROY' id: string } export interface PanelResizeStartAction { type: '@@cosmo-ui/PANEL_RESIZE_START' id: string idx: number } export interface PanelResizeAction { type: '@@cosmo-ui/PANEL_RESIZE' id: string intervals: number[] } export interface PanelResizeStopAction { type: '@@cosmo-ui/PANEL_RESIZE_STOP' id: string } export type PanelAction = PanelInitAction | PanelDestroyAction | PanelResizeStartAction | PanelResizeAction | PanelResizeStopAction