/**
 * @license
 * Copyright 2023 Tyler Technologies, Inc. 
 * License: Apache-2.0
 */
import { __decorate } from "tslib";
import { coerceBoolean, FoundationProperty } from '@tylertech/forge-core';
import { BaseComponent } from '../../core/base/base-component';
import { BASE_DRAWER_CONSTANTS } from './base-drawer-constants';
export class BaseDrawerComponent extends BaseComponent {
    static get observedAttributes() {
        return [
            BASE_DRAWER_CONSTANTS.attributes.OPEN,
            BASE_DRAWER_CONSTANTS.attributes.DIRECTION
        ];
    }
    constructor() {
        super();
    }
    connectedCallback() {
        this._foundation.connect();
    }
    disconnectedCallback() {
        this._foundation.disconnect();
    }
    attributeChangedCallback(name, oldValue, newValue) {
        switch (name) {
            case BASE_DRAWER_CONSTANTS.attributes.OPEN:
                this.open = coerceBoolean(newValue);
                break;
            case BASE_DRAWER_CONSTANTS.attributes.DIRECTION:
                this.direction = newValue;
                break;
        }
    }
}
__decorate([
    FoundationProperty()
], BaseDrawerComponent.prototype, "open", void 0);
__decorate([
    FoundationProperty()
], BaseDrawerComponent.prototype, "direction", void 0);
