/**
 * @license
 * Copyright Tyler Technologies, Inc. 
 * License: Apache-2.0
 */
import { __decorate } from "tslib";
import { customElement, coreProperty } from '@tylertech/forge-core';
import { BaseComponent } from '../core/base/base-component';
import { ExpansionPanelComponent } from '../expansion-panel';
import { AccordionAdapter } from './accordion-adapter';
import { ACCORDION_CONSTANTS } from './accordion-constants';
import { AccordionCore } from './accordion-core';
/**
 * @tag forge-accordion
 *
 * @dependency forge-expansion-panel
 */
let AccordionComponent = class AccordionComponent extends BaseComponent {
    static get observedAttributes() {
        return [ACCORDION_CONSTANTS.attributes.PANEL_SELECTOR];
    }
    constructor() {
        super();
        this._core = new AccordionCore(new AccordionAdapter(this));
    }
    connectedCallback() {
        this._core.initialize();
    }
    attributeChangedCallback(name, oldValue, newValue) {
        switch (name) {
            case ACCORDION_CONSTANTS.attributes.PANEL_SELECTOR:
                this.panelSelector = newValue;
                break;
        }
    }
};
__decorate([
    coreProperty()
], AccordionComponent.prototype, "panelSelector", void 0);
AccordionComponent = __decorate([
    customElement({
        name: ACCORDION_CONSTANTS.elementName,
        dependencies: [ExpansionPanelComponent]
    })
], AccordionComponent);
export { AccordionComponent };
