import { type App, type Component, type VNodeChild } from 'vue'; import { type RouterConfig, type RequiredRouterConfig } from './router'; import { type LayoutConfig, type RequiredLayoutConfig } from './layout'; import { type SiteConfig, type RequiredSiteConfig } from './site'; import { type HttpConfig, type RequiredHttpConfig } from './http'; import { type ApiConfig, type RequiredApiConfig } from './api'; import { type PersistConfig } from './persist'; import { type I18nConfig } from './i18n'; import { type RouteRecordRaw } from 'vue-router'; import { type CoseyRouterOptions } from '../router'; import { type UserInfo } from '../store'; export interface LayoutComponents { base?: string | Component; sidebar?: string | Component; snugAside?: string | Component; snugMenu?: string | Component; aside?: string | Component; menu?: string | Component; mask?: string | Component; content?: string | Component; header?: string | Component; topbar?: string | Component; brand?: string | Component; toggle?: string | Component; topSnugMenu?: string | Component; breadcrumb?: string | Component; search?: string | Component; colorScheme?: string | Component; user?: string | Component; tabbar?: string | Component; main?: string | Component; iframe?: string | Component; switchEffect?: string | Component; auth?: string | Component; login?: string | Component; changePassword?: string | Component; exception?: string | Component; forbidden?: string | Component; notFound?: string | Component; internalServerError?: string | Component; empty?: string | Component; locale?: string | Component; } export interface LayoutSlots { topbarRight?: () => VNodeChild; topbarWidget?: () => VNodeChild; authWidget?: () => VNodeChild; userMenu?: () => VNodeChild; afterToggle?: () => VNodeChild; } type FilterRouteHandler = (route: RouteRecordRaw) => RouteRecordRaw | void | boolean | undefined | null; type InitializeDataHandler = (handlers: { setUserInfo: (userInfo: UserInfo) => void; setRoutes: (route: RouteRecordRaw | RouteRecordRaw[]) => void; }) => void | Promise; export type CoseyOptions = { router?: CoseyRouterOptions & RouterConfig; http?: HttpConfig; layout?: LayoutConfig; site?: SiteConfig; api?: ApiConfig; initializeData?: InitializeDataHandler; filterRoute?: FilterRouteHandler; components?: LayoutComponents; slots?: LayoutSlots; persist?: PersistConfig; i18n?: I18nConfig; }; export interface GlobalConfig { router: RequiredRouterConfig; http: RequiredHttpConfig; layout: RequiredLayoutConfig; site: RequiredSiteConfig; api: RequiredApiConfig; initializeData: NonNullable; filterRoute: NonNullable; components: NonNullable; slots: NonNullable; } export declare let globalConfig: GlobalConfig; export declare function launchGlobalConfig(app: App, options: CoseyOptions): void; export declare function useGlobalConfig(): GlobalConfig; export {};