import { __decorate } from "tslib";
import { attr } from '@ni/fast-element';
import { DesignSystem, FoundationElement } from '@ni/fast-foundation';
import { styles } from './styles';
import { template } from './template';
import { FvAccordionItemAppearance } from './types';
/**
 * An accordion item component that can be expanded or collapsed to
 * show or hide its content.
 */
export class FvAccordionItem extends FoundationElement {
    constructor() {
        super(...arguments);
        this.header = '';
        this.expanded = false;
        this.appearance = FvAccordionItemAppearance.ghost;
    }
    /** @internal */
    handleToggle(event) {
        this.expanded = event.target.open;
        return true;
    }
}
__decorate([
    attr
], FvAccordionItem.prototype, "header", void 0);
__decorate([
    attr({ mode: 'boolean' })
], FvAccordionItem.prototype, "expanded", void 0);
__decorate([
    attr()
], FvAccordionItem.prototype, "appearance", void 0);
const okFvAccordionItem = FvAccordionItem.compose({
    baseName: 'fv-accordion-item',
    template,
    styles
});
DesignSystem.getOrCreate()
    .withPrefix('ok')
    .register(okFvAccordionItem());
export const fvAccordionItemTag = 'ok-fv-accordion-item';
//# sourceMappingURL=index.js.map