import type { To } from 'react-router-dom' import type { Nullable } from '@/utils/types' import type { RouteObject } from 'react-router-dom' import type { SimplePaletteColorOptions } from '@mui/material' // 自定义颜色 declare module '@mui/material/styles' { interface Palette { yacolor: { // font-color fc: Palette['primary'] // background-color bg: Palette['primary'] // border-color boc: Palette['primary'] // shadow-color sdc: Palette['primary'] } } // allow configuration using `createTheme` interface PaletteOptions { yacolor?: { fc: PaletteOptions['primary'] bg: PaletteOptions['primary'] boc: PaletteOptions['primary'] sdc: Palette['primary'] } } } // preset color theme export interface SystemPalette { primary?: SimplePaletteColorOptions secondary?: SimplePaletteColorOptions } export enum AppThemeMode { light = 'light', dark = 'dark', } export interface AppConfig { name: string navbar: { homePath: To logo?: string alt?: string } locales: 'zhCN' | 'enUS' mode?: keyof typeof AppThemeMode footer?: Nullable palette?: SystemPalette } export enum RouteMetaType { ROOT_LINK = 'ROOT_LINK', LINK = 'LINK', ROOT = 'ROOT', } export interface DefinedRouteObject extends RouteObject { meta?: { name: string type: keyof typeof RouteMetaType icon?: React.ReactNode desc?: string } children?: DefinedRouteObject[] }