import { CdkScrollable, Overlay, OverlayConfig, ScrollStrategy } from '@angular/cdk/overlay';
import { AfterContentInit, AfterViewInit, EventEmitter, InjectionToken, OnInit, TemplateRef, Type } from '@angular/core';
import { FormControl } from '@angular/forms';
import { KbqPopUp, KbqPopUpTrigger, PopUpPlacements, PopUpSizes } from '@koobiq/components/core';
import { KbqDropdownTrigger } from '@koobiq/components/dropdown';
import { KbqInput } from '@koobiq/components/input';
import { Subscription } from 'rxjs';
import * as i0 from "@angular/core";
export interface KbqAppSwitcherApp {
    name: string;
    id: string | number;
    type?: string | number;
    icon: string;
    caption?: string;
    aliases?: KbqAppSwitcherApp[];
    link?: string;
}
export interface KbqAppSwitcherSite {
    name: string;
    id: string | number;
    status?: string;
    icon?: string;
    apps: KbqAppSwitcherApp[];
}
/** @docs-private */
export declare function defaultGroupBy(app: KbqAppSwitcherApp, groups: Record<string, KbqAppSwitcherApp>, untyped: KbqAppSwitcherApp[]): void;
export declare const KBQ_MIN_NUMBER_OF_APPS_TO_ENABLE_SEARCH: number;
export declare const KBQ_MIN_NUMBER_OF_APPS_TO_ENABLE_GROUPING: number;
/** @docs-private */
export declare const KBQ_APP_SWITCHER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
/** @docs-private */
export declare function kbqAppSwitcherScrollStrategyFactory(overlay: Overlay): () => ScrollStrategy;
/** @docs-private */
export declare const KBQ_APP_SWITCHER_SCROLL_STRATEGY_FACTORY_PROVIDER: {
    provide: InjectionToken<() => ScrollStrategy>;
    deps: (typeof Overlay)[];
    useFactory: typeof kbqAppSwitcherScrollStrategyFactory;
};
/** default configuration of app-switcher */
/** @docs-private */
export declare const KBQ_APP_SWITCHER_DEFAULT_CONFIGURATION: {
    searchPlaceholder: string;
    searchEmptyResult: string;
    sitesHeader: string;
};
/** Injection Token for providing configuration of app-switcher */
/** @docs-private */
export declare const KBQ_APP_SWITCHER_CONFIGURATION: InjectionToken<unknown>;
/** @docs-private */
export declare class KbqAppSwitcherComponent extends KbqPopUp implements AfterViewInit {
    /** @docs-private */
    protected readonly localeService: import("@koobiq/components/core").KbqLocaleService | null;
    readonly externalConfiguration: unknown;
    configuration: any;
    /** localized data
     * @docs-private */
    get localeData(): any;
    /** @docs-private */
    readonly searchControl: FormControl<string | null>;
    /** @docs-private */
    filteredSites: KbqAppSwitcherSite[];
    /** @docs-private */
    prefix: string;
    /** @docs-private */
    trigger: KbqAppSwitcherTrigger;
    /** @docs-private */
    isTrapFocus: boolean;
    /** @docs-private */
    protected activeSite: KbqAppSwitcherSite;
    /** @docs-private */
    protected activeApp: KbqAppSwitcherApp;
    /** @docs-private */
    input: KbqInput;
    /** @docs-private */
    otherSites: KbqDropdownTrigger;
    constructor();
    ngAfterViewInit(): void;
    /** @docs-private */
    updateClassMap(placement: string, customClass: string, size: PopUpSizes): void;
    /** @docs-private */
    updateTrapFocus(isTrapFocus: boolean): void;
    /** @docs-private */
    escapeHandler(): void;
    /** @docs-private */
    selectAppInSite(site: KbqAppSwitcherSite, app: KbqAppSwitcherApp): void;
    private filterSites;
    private updateLocaleParams;
    private initDefaultParams;
    static ɵfac: i0.ɵɵFactoryDeclaration<KbqAppSwitcherComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<KbqAppSwitcherComponent, "kbq-app-switcher", never, {}, {}, never, never, true, never>;
}
export declare class KbqAppSwitcherTrigger extends KbqPopUpTrigger<KbqAppSwitcherComponent> implements AfterContentInit, OnInit {
    /** @docs-private */
    protected scrollStrategy: () => ScrollStrategy;
    /** @docs-private */
    arrow: boolean;
    /** @docs-private */
    customClass: string;
    /** @docs-private */
    private hasBackdrop;
    /** @docs-private */
    private size;
    /** @docs-private */
    content: string | TemplateRef<any>;
    /** @docs-private */
    header: string | TemplateRef<any>;
    /** @docs-private */
    footer: string | TemplateRef<any>;
    /** @docs-private */
    private closeOnScroll;
    /** Whether search is used or not */
    get withSearch(): boolean;
    /** Number of applications to choose from
     * @docs-private */
    get appsCount(): number;
    /** Whether the sites are used or not
     * @docs-private */
    get sitesMode(): boolean;
    /** Whether the sites are used or not
     * @docs-private */
    get currentApps(): KbqAppSwitcherApp[];
    /** Selected application */
    selectedApp: KbqAppSwitcherApp;
    /** Placement of popUp */
    placement: PopUpPlacements;
    /** Class that will be used in the background */
    backdropClass: string;
    /** Offset of popUp */
    offset: number | null;
    /** Array of sites */
    get sites(): KbqAppSwitcherSite[];
    set sites(value: KbqAppSwitcherSite[]);
    private _parsedSites;
    /** Array of applications */
    get apps(): KbqAppSwitcherApp[];
    set apps(apps: KbqAppSwitcherApp[]);
    private makeGroupsForApps;
    private _parsedApps;
    /** Function to group the apps by type. The first argument is an app object with type.
     * The second is a groups object and third is an array for untyped apps */
    get groupBy(): (app: KbqAppSwitcherApp, groups: Record<string, KbqAppSwitcherApp>, untyped: KbqAppSwitcherApp[]) => void;
    set groupBy(fn: (app: KbqAppSwitcherApp, groups: Record<string, KbqAppSwitcherApp>, untyped: KbqAppSwitcherApp[]) => void);
    private _groupBy;
    /** Selected site */
    get selectedSite(): KbqAppSwitcherSite;
    set selectedSite(value: KbqAppSwitcherSite);
    private _parsedSelectedSite;
    /** Whether the trigger is disabled. */
    get disabled(): boolean;
    set disabled(value: boolean);
    /** @docs-private */
    get hasClickTrigger(): boolean;
    /** Emits a change event whenever the placement state changes. */
    readonly placementChange: EventEmitter<any>;
    /** Emits a change event whenever the visible state changes. */
    readonly visibleChange: EventEmitter<boolean>;
    /** @docs-private */
    readonly selectedSiteChange: EventEmitter<KbqAppSwitcherSite>;
    /** @docs-private */
    readonly selectedAppChange: EventEmitter<KbqAppSwitcherApp>;
    /** @docs-private */
    trigger: string;
    /** @docs-private */
    originalSites: KbqAppSwitcherSite[];
    /** @docs-private */
    originalApps: KbqAppSwitcherApp[];
    /** @docs-private */
    protected originSelector: string;
    /** @docs-private */
    protected get overlayConfig(): OverlayConfig;
    /** @docs-private */
    protected preventClosingByInnerScrollSubscription: Subscription;
    ngOnInit(): void;
    ngAfterContentInit(): void;
    /** @docs-private */
    updateData(): void;
    /** Updates the current position.
     * @docs-private */
    updatePosition(reapplyPosition?: boolean): void;
    /** @docs-private */
    getOverlayHandleComponentType(): Type<KbqAppSwitcherComponent>;
    /** @docs-private */
    updateClassMap(newPlacement?: string): void;
    /** @docs-private */
    closingActions(): import("rxjs").Observable<void | MouseEvent | CdkScrollable>;
    private hideIfNotInViewPort;
    static ɵfac: i0.ɵɵFactoryDeclaration<KbqAppSwitcherTrigger, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<KbqAppSwitcherTrigger, "[kbqAppSwitcher]", ["kbqAppSwitcher"], { "selectedApp": { "alias": "selectedApp"; "required": false; }; "placement": { "alias": "kbqAppSwitcherPlacement"; "required": false; }; "backdropClass": { "alias": "backdropClass"; "required": false; }; "offset": { "alias": "offset"; "required": false; }; "sites": { "alias": "sites"; "required": false; }; "apps": { "alias": "apps"; "required": false; }; "groupBy": { "alias": "groupBy"; "required": false; }; "selectedSite": { "alias": "selectedSite"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "placementChange": "kbqPlacementChange"; "visibleChange": "kbqVisibleChange"; "selectedSiteChange": "selectedSiteChange"; "selectedAppChange": "selectedAppChange"; }, never, never, true, never>;
    static ngAcceptInputType_offset: unknown;
    static ngAcceptInputType_disabled: unknown;
}
