/// import { EventEmitter } from 'events'; import { type Model } from '@derbyjs/racer'; import { util } from '@derbyjs/racer'; import { type ComponentConstructor, type SingletonComponentConstructor } from './components'; import { type Derby } from './Derby'; import { Page, type PageBase } from './Page'; import { PageParams } from './routes'; import { type Views } from './templates/templates'; export declare function createAppPage(derby: any): typeof PageBase; interface AppOptions { appMetadata?: Record; scriptHash?: string; } type OnRouteCallback = (arg0: Page, arg1: Page, model: Model, params: PageParams, done?: () => void) => void; type Routes = [string, string, any][]; export declare abstract class AppBase extends EventEmitter { derby: Derby; name: string; filename: string; scriptHash: string; appMetadata: Record; Page: typeof PageBase; proto: any; views: Views; tracksRoutes: Routes; model: Model; page: PageBase; protected _pendingComponentMap: Record; protected _waitForAttach: boolean; protected _cancelAttach: boolean; use: typeof util.use; serverUse: typeof util.serverUse; constructor(derby: any, name: any, filename: any, options?: AppOptions); abstract _init(options?: AppOptions): any; loadViews(_viewFilename: any, _viewName: any): void; loadStyles(_filename: any, _options: any): void; component(constructor: ComponentConstructor | SingletonComponentConstructor): this; component(name: string, constructor: ComponentConstructor | SingletonComponentConstructor, isDependency?: boolean): this; addViews(_viewFileName: string, _namespace: string): void; onRoute(callback: OnRouteCallback, page: Page, next: () => void, done: () => void): void; } export declare class App extends AppBase { page: Page; history: { refresh(): void; push(): void; replace(): void; }; constructor(derby: any, name: any, filename: any, options: AppOptions); _init(_options: any): void; private _views; private _finishInit; private _getAppData; private _contentReady; private _getAppStateScript; createPage(): Page; private _destroyCurrentPage; private _autoRefresh; private _handleMessage; static _parseInitialData(jsonString: string): any; } export {};