import { AfterViewChecked, ChangeDetectorRef, ElementRef, EventEmitter, InjectionToken, OnDestroy, QueryList } from '@angular/core';
import { Subject } from 'rxjs';
import { KbqTitleTextRef } from '../title';
import { KbqOptgroup } from './optgroup';
import * as i0 from "@angular/core";
/** Event object emitted by KbqOption when selected or deselected. */
export declare class KbqOptionSelectionChange<T = KbqOption> {
    source: T;
    isUserInput: boolean;
    constructor(source: T, isUserInput?: boolean);
}
/**
 * Describes a parent component that manages a list of options.
 * Contains properties that the options can inherit.
 * @docs-private
 */
export interface KbqOptionParentComponent {
    multiple?: boolean;
    multiSelection?: boolean;
}
/**
 * Handler that will update scroll position of elements inside overlay
 */
export interface KeyboardNavigationHandler {
    /** Scrolls the active option into view. */
    scrollActiveOptionIntoView(): void;
}
/**
 * Injection token used to provide the parent component to options.
 */
export declare const KBQ_OPTION_PARENT_COMPONENT: InjectionToken<KbqOptionParentComponent>;
export declare abstract class KbqOptionBase {
    value: any;
    abstract get viewValue(): string;
    abstract get disabled(): boolean;
    abstract set disabled(value: any);
    abstract readonly onSelectionChange: EventEmitter<KbqOptionSelectionChange<any>>;
    abstract select(): void;
    abstract deselect(): void;
    /** Emits the selection change event. */
    protected emitSelectionChangeEvent(isUserInput?: boolean): void;
}
export declare class KbqVirtualOption extends KbqOptionBase {
    value: any;
    private _disabled;
    get disabled(): any;
    set disabled(value: any);
    get selected(): boolean;
    private _selected;
    get viewValue(): string;
    readonly onSelectionChange: EventEmitter<KbqOptionSelectionChange<KbqVirtualOption>>;
    constructor(value: any, _disabled?: boolean);
    select(): void;
    deselect(): void;
}
/**
 * Single option inside of a `<kbq-select>` element.
 */
export declare class KbqOption extends KbqOptionBase implements AfterViewChecked, OnDestroy, KbqTitleTextRef {
    private readonly elementRef;
    private readonly changeDetectorRef;
    private readonly parent;
    readonly group: KbqOptgroup;
    textElement: ElementRef;
    /** The form value of the option. */
    value: any;
    selectable: boolean;
    userSelect: boolean;
    get showCheckbox(): boolean;
    set showCheckbox(value: boolean);
    private _showCheckbox;
    /** Event emitted when the option is selected or deselected. */
    readonly onSelectionChange: EventEmitter<KbqOptionSelectionChange<KbqOption>>;
    /** Emits when the state of the option changes and any parents have to be notified. */
    readonly stateChanges: Subject<void>;
    /**
     * The displayed value of the option. It is necessary to show the selected option in the
     * select's trigger.
     */
    get viewValue(): string;
    set viewValue(value: string);
    private _viewValue;
    /** Whether the wrapping component is in multiple selection mode. */
    get multiple(): boolean;
    get id(): string;
    private _id;
    get selected(): boolean;
    private _selected;
    get disabled(): any;
    set disabled(value: any);
    private _disabled;
    /**
     * Whether or not the option is currently active and ready to be selected.
     * An active option displays styles as if it is focused, but the
     * focus is actually retained somewhere else. This comes in handy
     * for components like autocomplete where focus must remain on the input.
     */
    get active(): boolean;
    private _active;
    private mostRecentViewValue;
    constructor(elementRef: ElementRef<HTMLElement>, changeDetectorRef: ChangeDetectorRef, parent: KbqOptionParentComponent, group: KbqOptgroup);
    ngAfterViewChecked(): void;
    ngOnDestroy(): void;
    /** @docs-private */
    getHeight(): number;
    select(emitEvent?: boolean): void;
    deselect(emitEvent?: boolean): void;
    focus(): void;
    /**
     * This method sets display styles on the option to make it appear
     * active. This is used by the ActiveDescendantKeyManager so key
     * events will display the proper options as active on arrow key events.
     */
    setActiveStyles(): void;
    /**
     * This method removes display styles on the option that made it appear
     * active. This is used by the ActiveDescendantKeyManager so key
     * events will display the proper options as active on arrow key events.
     */
    setInactiveStyles(): void;
    /** Gets the label to be used when determining whether the option should be focused. */
    getLabel(): string;
    /** Ensures the option is selected when activated from the keyboard. */
    handleKeydown(event: KeyboardEvent): void;
    /**
     * `Selects the option while indicating the selection came from the user. Used to
     * determine if the select's view -> model callback should be invoked.`
     */
    selectViaInteraction(): void;
    getTabIndex(): string;
    getHostElement(): HTMLElement;
    static ɵfac: i0.ɵɵFactoryDeclaration<KbqOption, [null, null, { optional: true; }, { optional: true; }]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<KbqOption, "kbq-option", ["kbqOption"], { "value": { "alias": "value"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "userSelect": { "alias": "userSelect"; "required": false; }; "showCheckbox": { "alias": "showCheckbox"; "required": false; }; "viewValue": { "alias": "viewValue"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "onSelectionChange": "onSelectionChange"; }, never, ["kbq-pseudo-checkbox", "*"], false, never>;
    static ngAcceptInputType_selectable: unknown;
    static ngAcceptInputType_userSelect: unknown;
}
/**
 * Counts the amount of option group labels that precede the specified option.
 * @param optionIndex Index of the option at which to start counting.
 * @param options Flat list of all of the options.
 * @param optionGroups Flat list of all of the option groups.
 * @docs-private
 */
export declare function countGroupLabelsBeforeOption(optionIndex: number, options: QueryList<KbqOption>, optionGroups: QueryList<KbqOptgroup>): number;
/**
 * Determines the position to which to scroll a panel in order for an option to be into view.
 * @param optionIndex Index of the option to be scrolled into the view.
 * @param optionHeight Height of the options.
 * @param currentScrollPosition Current scroll position of the panel.
 * @param panelHeight Height of the panel.
 * @docs-private
 */
export declare function getOptionScrollPosition(optionIndex: number, optionHeight: number, currentScrollPosition: number, panelHeight: number): number;
