/**
 * @license
 * Copyright 2023 Tyler Technologies, Inc. 
 * License: Apache-2.0
 */
import { __decorate } from "tslib";
import { FoundationProperty, coerceNumber, coerceBoolean } from '@tylertech/forge-core';
import { BaseComponent } from '../core/base/base-component';
import { LIST_DROPDOWN_CONSTANTS } from './list-dropdown-constants';
export class ListDropdownAware extends BaseComponent {
    constructor() {
        super();
    }
    attributeChangedCallback(name, oldValue, newValue) {
        switch (name) {
            case LIST_DROPDOWN_CONSTANTS.attributes.POPUP_CLASSES:
                this.popupClasses = newValue;
                break;
            case LIST_DROPDOWN_CONSTANTS.attributes.OPTION_LIMIT:
                this.optionLimit = coerceNumber(newValue);
                break;
            case LIST_DROPDOWN_CONSTANTS.attributes.OBSERVE_SCROLL:
                this.observeScroll = coerceBoolean(newValue);
                break;
            case LIST_DROPDOWN_CONSTANTS.attributes.OBSERVE_SCROLL_THRESHOLD:
                this.observeScrollThreshold = coerceNumber(newValue);
                break;
            case LIST_DROPDOWN_CONSTANTS.attributes.SYNC_POPUP_WIDTH:
                this.syncPopupWidth = coerceBoolean(newValue);
                break;
            case LIST_DROPDOWN_CONSTANTS.attributes.CONSTRAIN_POPUP_WIDTH:
                this.constrainPopupWidth = coerceBoolean(newValue);
                break;
            case LIST_DROPDOWN_CONSTANTS.attributes.WRAP_OPTION_TEXT:
                this.wrapOptionText = coerceBoolean(newValue);
                break;
        }
    }
}
__decorate([
    FoundationProperty()
], ListDropdownAware.prototype, "popupClasses", void 0);
__decorate([
    FoundationProperty()
], ListDropdownAware.prototype, "popupHeaderBuilder", void 0);
__decorate([
    FoundationProperty()
], ListDropdownAware.prototype, "popupFooterBuilder", void 0);
__decorate([
    FoundationProperty()
], ListDropdownAware.prototype, "syncPopupWidth", void 0);
__decorate([
    FoundationProperty()
], ListDropdownAware.prototype, "optionLimit", void 0);
__decorate([
    FoundationProperty()
], ListDropdownAware.prototype, "observeScroll", void 0);
__decorate([
    FoundationProperty()
], ListDropdownAware.prototype, "observeScrollThreshold", void 0);
__decorate([
    FoundationProperty()
], ListDropdownAware.prototype, "constrainPopupWidth", void 0);
__decorate([
    FoundationProperty()
], ListDropdownAware.prototype, "wrapOptionText", void 0);
