import { OnDestroy } from "@angular/core";
import { Router } from "@angular/router";
import { DrawerComponent } from "../layout/drawer/index.component";
export declare type DrawerConfig = {
    title: string;
    subTitle?: string;
    mode?: "outer" | "inner";
    top?: number;
};
export declare const DefaultDrawerConfig: Readonly<DrawerConfig>;
export declare type DrawerShowInstance<T> = {
    instance: T;
    result: Promise<{
        type: "complete" | "hide";
        data?: any;
    }>;
};
export declare type DrawerChangeEvent = {
    type: "show" | "hide" | "complete";
    cancel: () => void;
    detail: Record<string, any>;
};
export declare type DrawerChangeListener = (event: DrawerChangeEvent) => void;
export declare class DrawerService implements OnDestroy {
    private router;
    private uniqueDrawerComponent;
    private resultPromiseResolveMap;
    private routerSubscription;
    private ListenChangeCbs;
    constructor(router: Router);
    readonly cacheKey: string;
    ngOnDestroy(): void;
    listenRouterChange(): void;
    setDrawer(component: DrawerComponent): void;
    removeDrawer(): void;
    show<T>(component: new (...args: any[]) => T, config: DrawerConfig, data?: {}): DrawerShowInstance<T>;
    hide(): void;
    complete(data?: any): void;
    setConfig(config: Partial<DrawerConfig>): void;
    deleteCache(cacheKey: string): void;
    onChange(callback: DrawerChangeListener): () => void;
    private checkChange;
}
