40 lines
1 KiB
TypeScript
40 lines
1 KiB
TypeScript
import React from 'react';
|
|
import { IconType } from 'react-icons';
|
|
|
|
// Extended page configuration interface that includes sidebar properties
|
|
export interface PageConfig {
|
|
// Core page properties
|
|
path: string;
|
|
component: React.ComponentType<any>;
|
|
|
|
// Module management
|
|
moduleEnabled?: boolean;
|
|
|
|
// Performance & caching
|
|
persistent?: boolean;
|
|
preserveState?: boolean;
|
|
preload?: boolean;
|
|
|
|
// Sidebar properties
|
|
id: string;
|
|
name: string;
|
|
icon: IconType;
|
|
order?: number; // For sidebar ordering
|
|
showInSidebar?: boolean; // Whether to show in sidebar (default: true)
|
|
|
|
// Lifecycle hooks
|
|
onActivate?: () => void | Promise<void>;
|
|
onDeactivate?: () => void | Promise<void>;
|
|
onLoad?: () => void | Promise<void>;
|
|
onUnload?: () => void | Promise<void>;
|
|
}
|
|
|
|
// Sidebar item interface for compatibility
|
|
export interface SidebarItem {
|
|
id: string;
|
|
name: string;
|
|
link: string;
|
|
icon: IconType;
|
|
moduleEnabled: boolean;
|
|
order: number;
|
|
}
|