import { RouteConfig } from 'vue-router'; import { Page } from './api'; export interface CmsSettings { navigation: NavigationSettings; pageTreeSorting?: PageTreeSorting; customCrudEditorButtons?: CustomCrudEditorButtons; // server side settings apiDomain?: string; environments?: Environment[]; showLogoutInNavigation?: boolean; authenticationType?: string; navigationBrandItems?: NavigationBrandItem[]; maxUploadSize?: number; maxIpWhiteListDays?: number; baseUrl?: string; baseCmsErrorMessage: string; } export interface CustomCrudEditorButtons { [moduleName: string]: Toolbar; } export interface Toolbar { header?: ToolbarItem[]; footer?: ToolbarItem[]; } export type ToolbarItem = ToolbarButton | ToolbarComponent; export interface ToolbarComponent { component: Element; } export interface ToolbarButton { label: string; href: string; classList?: string[]; slot?: string; target?: string; } export interface NavigationSettings { brand?: NavigationBrand; startRoute?: string; items: NavigationItem[]; } export interface NavigationBrand { label: string; items?: NavigationBrandItem[]; } export interface NavigationBrandItem { href: string; label: string; } export interface NavigationItem { href: string; label: string; factory?: RouteConfig; items?: NavigationItem[]; } export type PageTreeSorting = (a: Page, b: Page) => number; export interface Environment { label: string; color: string; textColor: string; isActive: boolean; }