/** * PageManager page interface and helpers. * Used by PageData definitions and SidebarProvider. */ import type React from 'react'; export interface GenericPageData { id: string; path: string; name: string; description?: string; parentPath?: string; icon?: React.ComponentType>; title?: string; subtitle?: string; headerButtons?: Array>; content?: Array>; moduleEnabled?: boolean; order?: number; hide?: boolean; showInSidebar?: boolean; showInSidebarIf?: boolean; hasSubpages?: boolean; privilegeChecker?: () => Promise | boolean; persistent?: boolean; preload?: boolean; preserveState?: boolean; onActivate?: () => void | Promise; onLoad?: () => void | Promise; onUnload?: () => void | Promise; } type TranslationFunction = (key: string, params?: Record) => string; /** * Resolve display text from a page name (i18n key) via the translation function. */ export function resolveLanguageText( name: string, t: TranslationFunction ): string { return t(name); }