import { FocusMonitor } from '@angular/cdk/a11y';
import { Clipboard } from '@angular/cdk/clipboard';
import { SelectionModel } from '@angular/cdk/collections';
import { AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnDestroy, OnInit, QueryList } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import { FocusKeyManager, IFocusableOption } from '@koobiq/cdk/a11y';
import { KbqOptgroup, KbqOptionActionComponent, KbqTitleTextRef, MultipleMode } from '@koobiq/components/core';
import { KbqDropdownTrigger } from '@koobiq/components/dropdown';
import { KbqTooltipTrigger } from '@koobiq/components/tooltip';
import { Observable, Subject } from 'rxjs';
import * as i0 from "@angular/core";
export interface KbqOptionEvent {
    option: KbqListOption;
}
export declare const KBQ_SELECTION_LIST_VALUE_ACCESSOR: any;
export declare class KbqListSelectionChange {
    source: KbqListSelection;
    option: KbqListOption;
    constructor(source: KbqListSelection, option: KbqListOption);
}
export declare class KbqListSelectAllEvent<T> {
    source: KbqListSelection;
    options: T[];
    constructor(source: KbqListSelection, options: T[]);
}
/**
 * Event class that occurs when copying an item from the KbqListSelection.
 * Used to pass data about the copied item and copy context.
 *
 * @param source - instance of KbqListSelection
 * @param option - instance of KbqListOption
 * @param event - original keyboard event (optional) that triggered the copy
 */
export declare class KbqListCopyEvent<T> {
    source: KbqListSelection;
    option: T;
    event?: KeyboardEvent | undefined;
    constructor(source: KbqListSelection, option: T, event?: KeyboardEvent | undefined);
}
export declare class KbqListSelection implements AfterContentInit, AfterViewInit, OnDestroy, ControlValueAccessor {
    private elementRef;
    private changeDetectorRef;
    private clipboard;
    protected readonly focusMonitor: FocusMonitor;
    keyManager: FocusKeyManager<KbqListOption>;
    options: QueryList<KbqListOption>;
    readonly onSelectAll: EventEmitter<KbqListSelectAllEvent<KbqListOption>>;
    readonly onCopy: EventEmitter<KbqListCopyEvent<KbqListOption>>;
    get autoSelect(): boolean;
    set autoSelect(value: boolean);
    private _autoSelect;
    get noUnselectLast(): boolean;
    set noUnselectLast(value: boolean);
    private _noUnselectLast;
    multipleMode: MultipleMode | null;
    get multiple(): boolean;
    horizontal: boolean;
    get tabIndex(): any;
    set tabIndex(value: any);
    private _tabIndex;
    get disabled(): boolean;
    set disabled(value: boolean);
    private _disabled;
    /**
     * Function used for comparing an option against the selected value when determining which
     * options should appear as selected. The first argument is the value of an options. The second
     * one is a value from the selected value. A boolean must be returned.
     */
    compareWith: (o1: any, o2: any) => boolean;
    userTabIndex: number | null;
    get showCheckbox(): boolean;
    readonly selectionChange: EventEmitter<KbqListSelectionChange>;
    selectionModel: SelectionModel<KbqListOption>;
    get optionFocusChanges(): Observable<KbqOptionEvent>;
    get optionBlurChanges(): Observable<KbqOptionEvent>;
    _value: string[] | null;
    private readonly destroyRef;
    private optionFocusSubscription;
    private optionBlurSubscription;
    constructor(elementRef: ElementRef<HTMLElement>, changeDetectorRef: ChangeDetectorRef, multiple: MultipleMode, clipboard: Clipboard);
    ngAfterContentInit(): void;
    ngAfterViewInit(): void;
    ngOnDestroy(): void;
    focus(): void;
    blur(): void;
    selectAll(): void;
    deselectAll(): void;
    updateScrollSize(): void;
    setSelectedOptionsByClick(option: KbqListOption, shiftKey: boolean, ctrlKey: boolean): void;
    setSelectedOptionsByKey(option: KbqListOption, shiftKey: boolean, ctrlKey: boolean): void;
    selectActiveOptions(): void;
    writeValue(values: string[]): void;
    registerOnChange(fn: (value: any) => void): void;
    registerOnTouched(fn: () => void): void;
    setDisabledState(isDisabled: boolean): void;
    getSelectedOptionValues(): string[];
    toggleFocusedOption(): void;
    canDeselectLast(listOption: KbqListOption): boolean;
    /** @docs-private */
    getHeight(): number;
    onTouched: () => void;
    removeOptionFromList(option: KbqListOption): void;
    /** Handles keydown events on the list. */
    onKeyDown(event: KeyboardEvent): void;
    reportValueChange(): void;
    emitChangeEvent(option: KbqListOption): void;
    protected updateTabIndex(): void;
    private onCopyDefaultHandler;
    private resetOptions;
    private dropSubscriptions;
    private listenToOptionsFocus;
    /** Checks whether any of the options is focused. */
    private hasFocusedOption;
    private getOptionByValue;
    private setOptionsFromValues;
    /**
     * Utility to ensure all indexes are valid.
     * @param index The index to be checked.
     * @returns True if the index is valid for our list of options.
     */
    private isValidIndex;
    private getOptionIndex;
    private onChange;
    private selectAllOptions;
    private copyActiveOption;
    static ɵfac: i0.ɵɵFactoryDeclaration<KbqListSelection, [null, null, { attribute: "multiple"; }, { optional: true; }]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<KbqListSelection, "kbq-list-selection", ["kbqListSelection"], { "autoSelect": { "alias": "autoSelect"; "required": false; }; "noUnselectLast": { "alias": "noUnselectLast"; "required": false; }; "horizontal": { "alias": "horizontal"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; }, { "onSelectAll": "onSelectAll"; "onCopy": "onCopy"; "selectionChange": "selectionChange"; }, ["options"], ["*"], false, never>;
    static ngAcceptInputType_horizontal: unknown;
    static ngAcceptInputType_disabled: unknown;
}
export declare class KbqListOptionCaption {
    static ɵfac: i0.ɵɵFactoryDeclaration<KbqListOptionCaption, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<KbqListOptionCaption, "[kbq-list-option-caption]", never, {}, {}, never, never, false, never>;
}
/**
 * Component for list-options of selection-list. Each list-option can automatically
 * generate a checkbox and can put current item into the selectionModel of selection-list
 * if the current item is selected.
 */
export declare class KbqListOption implements OnDestroy, OnInit, IFocusableOption, KbqTitleTextRef {
    private elementRef;
    private changeDetector;
    private ngZone;
    listSelection: KbqListSelection;
    readonly group: KbqOptgroup;
    hasFocus: boolean;
    preventBlur: boolean;
    readonly onFocus: Subject<KbqOptionEvent>;
    readonly onBlur: Subject<KbqOptionEvent>;
    actionButton: KbqOptionActionComponent;
    tooltipTrigger: KbqTooltipTrigger;
    dropdownTrigger: KbqDropdownTrigger;
    text: ElementRef;
    textElement: ElementRef;
    checkboxPosition: 'before' | 'after';
    /**
     * This is set to true after the first OnChanges cycle so we don't clear the value of `selected`
     * in the first cycle.
     */
    private inputsInitialized;
    get value(): any;
    set value(newValue: any);
    private _value;
    /** Whether list is disabled. */
    get disabled(): boolean;
    set disabled(value: boolean);
    private _disabled;
    get showCheckbox(): any;
    set showCheckbox(value: any);
    private _showCheckbox;
    get selected(): boolean;
    set selected(value: boolean);
    private _selected;
    get tabIndex(): any;
    constructor(elementRef: ElementRef<HTMLElement>, changeDetector: ChangeDetectorRef, ngZone: NgZone, listSelection: KbqListSelection, group: KbqOptgroup);
    ngOnInit(): void;
    ngOnDestroy(): void;
    toggle(): void;
    getLabel(): any;
    setSelected(selected: boolean): void;
    /** @docs-private */
    getHeight(): number;
    /** Handles click events on the list option. */
    handleClick($event: MouseEvent): void;
    onKeydown($event: any): void;
    focus(): void;
    blur(): void;
    getHostElement(): HTMLElement;
    static ɵfac: i0.ɵɵFactoryDeclaration<KbqListOption, [null, null, null, null, { optional: true; }]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<KbqListOption, "kbq-list-option", ["kbqListOption"], { "checkboxPosition": { "alias": "checkboxPosition"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "showCheckbox": { "alias": "showCheckbox"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; }, {}, ["actionButton", "tooltipTrigger", "dropdownTrigger"], ["[kbq-icon]", "*", "[kbq-list-option-caption]", "kbq-option-action"], false, never>;
    static ngAcceptInputType_disabled: unknown;
    static ngAcceptInputType_selected: unknown;
}
