export interface GridLayoutItem { /** * Unique identifier for the grid item */ i: string; /** * X position in grid units */ x: number; /** * Y position in grid units */ y: number; /** * Width in grid units */ w: number; /** * Height in grid units */ h: number; /** * Whether the item can be moved */ static?: boolean; /** * Whether the item can be resized */ resizable?: boolean; /** * Whether the item can be dragged */ draggable?: boolean; /** * Minimum width constraint */ minW?: number; /** * Maximum width constraint */ maxW?: number; /** * Minimum height constraint */ minH?: number; /** * Maximum height constraint */ maxH?: number; /** * Custom properties */ [key: string]: any; } export interface AvailableWidget { /** * Unique identifier for the widget */ id: string; /** * Display title of the widget */ title: string; /** * Optional description of the widget functionality */ description?: string; /** * Icon to display (Element Plus icon name) */ icon?: string; /** * Default width in grid units */ defaultWidth?: number; /** * Default height in grid units */ defaultHeight?: number; /** * Additional layout configuration */ layoutConfig?: Partial; /** * Any additional properties */ [key: string]: any; } export interface DashboardGridProps { /** * The current layout of the dashboard */ layout?: GridLayoutItem[]; /** * List of widgets that can be added to the dashboard */ availableWidgets?: AvailableWidget[]; /** * Number of columns in the grid * @default 12 */ colNum?: number; /** * Height of each row in pixels * @default 50 */ rowHeight?: number; /** * Margin between items [x, y] in pixels * @default [10, 10] */ margin?: number[]; /** * Whether the dashboard is in edit mode * @default false */ editMode?: boolean; /** * Whether the grid is responsive * @default true */ responsive?: boolean; /** * Text for the save button * @default "Save Layout" */ saveText?: string; /** * Text for the cancel button * @default "Cancel" */ cancelText?: string; /** * Text shown in edit mode instruction * @default "You can drag and resize widgets in edit mode." */ editModeText?: string; /** * Text for the add widgets section * @default "Add Widgets" */ addWidgetText?: string; }