import { IEventEmitter } from '@breadstone/mosaik-elements';
import { KeyboardController } from '../../../../Controllers/KeyboardController';
import { CustomElement } from '../../../Abstracts/CustomElement';
import type { IConnectedCallback } from '../../../Abstracts/Interfaces/IConnectedCallback';
import type { IDisconnectedCallback } from '../../../Abstracts/Interfaces/IDisconnectedCallback';
import type { ISelectorItemsChangedEvent, ISelectorItemsChangedEventDetail } from './Events/ISelectorItemsChangedEventDetail';
import type { ISelectorSelectionChangedEvent, ISelectorSelectionChangedEventDetail } from './Events/ISelectorSelectionChangedEventDetail';
import type { ISelectorElementEvents } from './ISelectorElementEvents';
import type { ISelectorElementProps } from './ISelectorElementProps';
import type { SelectorItemElement } from './SelectorItemElement';
/**
 * The {@link SelectorElement} is a abstract base class for selection behavior.
 *
 * @fires selectionChanged {ISelectorSelectionChangedEvent} - Fired when the selection has changed.
 * @fires itemsChanged {ISelectorItemsChangedEvent} - Fired when the items has changed.
 *
 * @keyhandle Home - Selects the first item.
 * @keyhandle End - Selects the last item.
 *
 * @public
 * @abstract
 */
export declare abstract class SelectorElement<TItem extends SelectorItemElement = any> extends CustomElement implements IConnectedCallback, IDisconnectedCallback, ISelectorElementProps<TItem>, ISelectorElementEvents {
    private readonly _keyboardController;
    private readonly _itemsChanged;
    private readonly _selectionChanged;
    private _selectedItem;
    private _selectedIndex;
    private _slotChangeSubscription;
    /**
     * @public
     */
    constructor();
    /**
     * Returns the `{@link is}` property.
     * The `{@link is}` property represents natural name of this element.
     *
     * @public
     * @static
     * @readonly
     */
    static get is(): string;
    /**
     * Gets or sets the `items` property.
     *
     * @private
     * @readonly
     */
    get items(): Array<TItem>;
    /**
     * Gets a value that indicates whether the selector contains items.
     *
     * @private
     * @readonly
     */
    get hasItems(): boolean;
    /**
     * Gets the first item in the current selection or returns null if the selection is empty.
     *
     * @private
     * @readonly
     */
    get selectedItem(): TItem | null;
    protected set selectedItem(value: TItem | null);
    /**
     * Gets the index of the first item in the current selection or returns -1 if the selection is empty.
     *
     * @private
     */
    get selectedIndex(): number;
    protected set selectedIndex(value: number);
    /**
     * Called when the selection has changed.
     * Provides reference to `{@link ISelectorSelectionChangedEventDetail}` as event detail.
     *
     * @public
     * @readonly
     * @eventProperty
     */
    get selectionChanged(): IEventEmitter<ISelectorSelectionChangedEventDetail>;
    /**
     * Called when the items has changed.
     * Provides reference to `{@link ISelectorItemsChangedEventDetail}` as event detail.
     *
     * @public
     * @readonly
     * @eventProperty
     */
    get itemsChanged(): IEventEmitter<ISelectorItemsChangedEventDetail>;
    /**
     * @protected
     * @readonly
     */
    protected get keyboard(): KeyboardController;
    /**
     * @public
     * @override
     */
    connectedCallback(): void;
    /**
     * @public
     * @override
     */
    disconnectedCallback(): void;
    /**
     * Select the item.
     *
     * @public
     * @param item - The element, index or value to select.
     */
    select(item: string | number | TItem): void;
    /**
     * Unselect the item.
     *
     * @public
     * @param item - The element or index to unselect.
     */
    unselect(item: TItem | number): void;
    /**
     * Resets the current selection.
     *
     * @public
     */
    resetSelection(): void;
    /**
     * Select the next item after current selected item/index.
     *
     * @public
     */
    selectNext(): void;
    /**
     * Select the previous item before current selected item/index.
     *
     * @public
     */
    selectPrevious(): void;
    /**
     * Select the first item.
     *
     * @public
     */
    selectFirst(): void;
    /**
     * Select the last item.
     *
     * @public
     */
    selectLast(): void;
    /**
     * @protected
     * @override
     */
    protected onApplyTemplate(): void;
    /**
     * @protected
     * @virtual
     */
    protected onSelectionChanged(oldIndex: number, newIndex: number, cb?: (prev: TItem | null | undefined, next: TItem | null | undefined) => void): void;
    /**
     * @protected
     * @virtual
     */
    protected onItemsChanged(): void;
}
/**
 * @public
 */
declare global {
    interface HTMLElementEventMap {
        selectionChanged: ISelectorSelectionChangedEvent;
        itemsChanged: ISelectorItemsChangedEvent;
    }
}
//# sourceMappingURL=SelectorElement.d.ts.map