import type { App } from "../App.js"; import type { AtomControl } from "../web/controls/AtomControl.js"; import EventScope from "./EventScope.js"; import Route from "./Route.js"; import { type IDisposable } from "./types.js"; export declare const routeSymbol: unique symbol; export declare const displayRouteSymbol: unique symbol; export type CustomEventEx = CustomEvent & { executed?: boolean; promise?: Promise; returnResult?: boolean; }; export declare class PageCommands { static pushPage: (page: any, parameters: any) => any; static pushPageForResult: (page: any, parameters: any) => Promise; static openPage: (page: any, parameters: any) => any; } export type IPage = { default: abstract new (...a: any[]) => { parameters: TIn; close(result: TOut): any; }; } | (abstract new (...a: any[]) => { parameters: TIn; close(result: TOut): any; }); export default class Command { readonly name: string; readonly eventScope: EventScope; readonly registerOnClick: (p: T) => { "data-click-command": string; commandParameter: T; }; static routePrefix: string; static registry: Map; static routes: Command[]; static invokeRoute(route?: string, forceDisplay?: boolean): Command; static create({ name, eventScope, route, routeQueries, routeOrder, routeDefaults, pageLoader, pageListener, openPage, pushPage, registerOnClick, pushPageForResult, pushPageForResultOrCancel, listener }: { name?: string; eventScope?: EventScope; route?: string; routeQueries?: string[]; routeOrder?: number; routeDefaults?: Partial; registerOnClick?: (p: TIn) => any; pageLoader?: (() => Promise>); pageListener?: ((page: IPage) => (ce: CustomEvent) => any); openPage?: (() => Promise>); pushPage?: (() => Promise>); pushPageForResult?: (() => Promise>); pushPageForResultOrCancel?: (() => Promise>); listener?: ((ce: CustomEvent) => any); }): Command; private listener; /** * This name does not contain `event-` prefix */ get eventName(): string; private routeObj; get route(): Route; defaults?: any; constructor(name?: string, eventScope?: EventScope, registerOnClick?: (p: T) => { "data-click-command": string; commandParameter: T; }); displayRoute(p: Partial, absoluteUrl?: boolean): string; withRoute(route: string, queries?: string[], order?: number, defaults?: any): this; listen(r: { app: App; registerDisposable: (d: IDisposable) => void; }, handler?: (ce: CustomEventEx) => any): void; dispatch(detail?: T, cancelable?: boolean): void; private updateRoute; dispatchAsync(detail?: T, cancelable?: boolean): Promise; } export declare class Commands { protected static app: App; static install(control: AtomControl): void; } //# sourceMappingURL=Command.d.ts.map