/**
 * @license
 * Copyright Tyler Technologies, Inc. 
 * License: Apache-2.0
 */
import { tylIconCheckBox, tylIconCheckBoxOutlineBlank } from '@tylertech/tyler-icons/standard';
import { ListDropdownFoundation } from './list-dropdown-foundation';
import { ListDropdownAdapter } from './list-dropdown-adapter';
import { IconRegistry } from '../icon';
export class ListDropdown {
    constructor(_targetElement, config) {
        this._targetElement = _targetElement;
        IconRegistry.define([tylIconCheckBox, tylIconCheckBoxOutlineBlank]);
        this._foundation = new ListDropdownFoundation(new ListDropdownAdapter(this._targetElement), config);
    }
    destroy() {
        this._foundation.destroy();
    }
    /** Opens the dropdown. */
    open() {
        this._foundation.open();
    }
    /** Closes the dropdown. */
    close() {
        return this._foundation.close();
    }
    /** Gets the currently highlighted option index in the dropdown. */
    getActiveOptionIndex() {
        return this._foundation.getActiveOptionIndex();
    }
    getActiveOption() {
        return this._foundation.getActiveOption();
    }
    /** Toggles the selected option by index. Only applies when in multiselect mode. */
    toggleOptionMultiple(index, isSelected) {
        return this._foundation.toggleOptionMultiple(index, isSelected);
    }
    /** Activates the first selected option. */
    activateSelectedOption() {
        this._foundation.activateSelectedOption();
    }
    /** Activates the first non-disabled option. */
    activateFirstOption() {
        return this._foundation.activateFirstOption();
    }
    /** Activates (highlights) an option by index. */
    activateOption(index) {
        return this._foundation.activateOption(index);
    }
    /** Activates the first activatable option. */
    activateInitialOption() {
        return this._foundation.activateInitialOption();
    }
    /** Clears the active option from the dropdown */
    clearActiveOption() {
        this._foundation.clearActiveOption();
    }
    /** Sets the selected values. Only applies when in multiselect mode. */
    setSelectedValues(values) {
        return this._foundation.setSelectedValues(values);
    }
    get dropdownElement() {
        return this._foundation.dropdownElement;
    }
    setOptions(options) {
        this._foundation.setOptions(options);
    }
    appendOptions(options) {
        this._foundation.appendOptions(options);
    }
    scrollSelectedOptionIntoView(animate) {
        this._foundation.scrollSelectedOptionIntoView();
    }
    setScrollBottomListener(listener, threshold) {
        this._foundation.setScrollBottomListener(listener, threshold);
    }
    removeScrollBottomListener() {
        this._foundation.removeScrollBottomListener();
    }
    setBusyVisibility(isVisible) {
        this._foundation.setBusyVisibility(isVisible);
    }
    handleKey(key) {
        this._foundation.handleKey(key);
    }
}
