// #region Imports
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { fadeIn, fadeOut } from '../../../../Animations/Presets/Fade';
import { Listen } from '../../../../events/Decorators/ListenDecorator';
import { Animatable } from '../../../Behaviors/Animatable';
import { Closeable } from '../../../Behaviors/Closeable';
import { Disableable } from '../../../Behaviors/Disableable';
import { Iconable } from '../../../Behaviors/Iconable';
import { Labelable } from '../../../Behaviors/Labelable';
import { Orientable } from '../../../Behaviors/Orientable';
import { Selectable } from '../../../Behaviors/Selectable';
import { Themeable } from '../../../Behaviors/Themeable';
import { Valueable } from '../../../Behaviors/Valueable';
import { Component } from '../../../Decorators/ComponentDecorator';
import { CustomElement } from '../../Abstracts/CustomElement';
import { tabItemElementTemplate } from './TabItemElementTemplate';
import { tabItemElementCosmopolitanStyle } from './Themes/TabItemElement.Cosmopolitan';
import { tabItemElementJoyStyle } from './Themes/TabItemElement.Joy';
import { tabItemElementMemphisStyle } from './Themes/TabItemElement.Memphis';
// #endregion
/**
 * Tab Item - A navigation option within a tabbed interface.
 *
 * Used to switch between different views or sections of content.
 * Typically displayed as a clickable label, often accompanied by an icon.
 * Tabs help organize content into manageable sections, improving user experience and navigation.
 *
 * @name TabItemElement
 * @element mosaik-tab-item
 * @category Selector
 *
 * @fires selected {SelectedEvent} - Fired when the tab is selected.
 * @fires deselected {DeselectedEvent} - Fired when the tab is deselected.
 * @fires closed {ClosedEvent} - Fired when the tab will be closed.
 *
 * @slot - The default slot.
 *
 * @example
 * ```html
 * <mosaik-tab-item label="Home" icon="home-icon"></mosaik-tab-item>
 * ```
 *
 * @public
 */
let TabItemElement = class TabItemElement extends Themeable(Animatable(Orientable(Closeable(Selectable(Disableable(Labelable(Iconable(Valueable(CustomElement))))))))) {
    // #region Ctor
    /**
     * Constructs a new instance of the `TabItemElement` class.
     *
     * @public
     */
    constructor() {
        super();
        this.enter = fadeIn;
        this.exit = fadeOut;
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `is` property.
     *
     * @public
     * @static
     * @readonly
    */
    static get is() {
        return 'mosaik-tab-item';
    }
    // #endregion
    // #region Methods
    /**
     * @public
     * @override
     */
    connectedCallback() {
        super.connectedCallback();
        void this.play(this.enter ?? { steps: [] });
    }
    /**
     * @public
     * @override
     */
    disconnectedCallback() {
        void this.play(this.exit ?? { steps: [] });
        super.disconnectedCallback();
    }
    /**
     * @protected
     */
    onSelected() {
        void this.play(this.enter ?? { steps: [] });
    }
    /**
     * @protected
     */
    onDeselected() {
        void this.play(this.exit ?? { steps: [] });
    }
};
__decorate([
    Listen('selected'),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", void 0)
], TabItemElement.prototype, "onSelected", null);
__decorate([
    Listen('deselected'),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", void 0)
], TabItemElement.prototype, "onDeselected", null);
TabItemElement = __decorate([
    Component({
        selector: 'mosaik-tab-item',
        template: tabItemElementTemplate,
        themes: {
            joy: tabItemElementJoyStyle,
            memphis: tabItemElementMemphisStyle,
            cosmopolitan: tabItemElementCosmopolitanStyle
        },
        imports: []
    }),
    __metadata("design:paramtypes", [])
], TabItemElement);
export { TabItemElement };
//# sourceMappingURL=TabItemElement.js.map