import type { SetDataProgressOptions, ViewModelEvents, ViewModelOptions } from './view-model.js'; import type { LoadDataResult } from '../core/utils/load-data.js'; import type { InjectStyle } from '../core/utils/inject-styles.js'; import type { ProgressbarOptions } from '../core/utils/progressbar.js'; import type { UploadOptions } from '../extensions/upload.js'; import type { EmbedClientOptions } from '../extensions/embed-client.js'; import { ViewModel } from './view-model.js'; import { Progressbar } from '../core/utils/progressbar.js'; export type AppLoadingState = 'init' | 'error' | 'success'; export type AppLoadingStateOptions = T extends 'init' ? { progressbar: Progressbar; } : T extends 'error' ? { error: Error & { renderContent?: any; }; progressbar: Progressbar; } : undefined; export interface AppEvents extends ViewModelEvents { startLoadData: [subscribe: Progressbar['subscribeSync']]; } export interface AppOptions extends ViewModelOptions { mode: 'modelfree'; router: boolean; upload: Partial | boolean; embed: Partial | boolean; } type AppOptionsBind = AppOptions; export declare class App extends ViewModel { dom: ViewModel['dom'] & { loadingOverlay: HTMLElement; }; constructor(options?: Partial); setLoadingState(state: S, options?: AppLoadingStateOptions): void; setDataProgress(data: unknown, context: unknown, options?: SetDataProgressOptions): Promise; progressbar(options: ProgressbarOptions & { title?: string; }): Progressbar; trackLoadDataProgress(loadDataResult: LoadDataResult): Promise; initDom(styles?: InjectStyle[]): void; renderPage(): Promise; } export {};