import { Overlay } from '@angular/cdk/overlay';
import { ComponentType } from '@angular/cdk/portal';
import { InjectionToken, Injector, OnDestroy, TemplateRef } from '@angular/core';
import { KbqSidepanelConfig } from './sidepanel-config';
import { KbqSidepanelRef } from './sidepanel-ref';
import * as i0 from "@angular/core";
/** Injection token that can be used to specify default sidepanel options. */
export declare const KBQ_SIDEPANEL_DEFAULT_OPTIONS: InjectionToken<KbqSidepanelConfig<any>>;
export declare class KbqSidepanelService implements OnDestroy {
    private overlay;
    private injector;
    private defaultOptions;
    private parentSidepanelService;
    private openedSidepanelsAtThisLevel;
    /** Keeps track of the currently-open sidepanels. */
    get openedSidepanels(): KbqSidepanelRef[];
    constructor(overlay: Overlay, injector: Injector, defaultOptions: KbqSidepanelConfig, parentSidepanelService: KbqSidepanelService);
    ngOnDestroy(): void;
    open<T, D = any>(componentOrTemplateRef: ComponentType<T> | TemplateRef<T>, config?: KbqSidepanelConfig<D>): KbqSidepanelRef<T>;
    /**
     * Closes all of the currently-open sidepanels.
     */
    closeAll(): void;
    /**
     * Finds an open sidepanel by its id.
     * @param id ID to use when looking up the sidepanel.
     */
    getSidepanelById(id: string): KbqSidepanelRef | undefined;
    /**
     * Attaches the sidepanel container component to the overlay.
     */
    private attachContainer;
    /**
     * Creates a custom injector to be used inside the sidepanel. This allows a component loaded inside
     * of a sidepanel to close itself and, optionally, to return a value.
     * @param config Config object that is used to construct the sidepanel.
     * @param sidepanelRef Reference to the sidepanel.
     * @param sidepanelContainer Sidepanel container element that wraps all of the contents.
     * @returns The custom injector that can be used inside the sidepanel.
     */
    private createInjector;
    /**
     * Creates a new overlay and places it in the correct location.
     * @param config The user-specified sidepanel config.
     */
    private createOverlay;
    private closeSidepanels;
    private getBackdropClass;
    private getOpenedSidepanelsWithSamePosition;
    /**
     * Removes a sidepanel from the array of open sidepanels.
     * @param sidepanelRef Sidepanel to be removed.
     */
    private removeOpenSidepanel;
    static ɵfac: i0.ɵɵFactoryDeclaration<KbqSidepanelService, [null, null, { optional: true; }, { optional: true; skipSelf: true; }]>;
    static ɵprov: i0.ɵɵInjectableDeclaration<KbqSidepanelService>;
}
