// #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 { Orientable } from '../../../Behaviors/Orientable';
import { Component } from '../../../Decorators/ComponentDecorator';
import { Property } from '../../../Decorators/PropertyDecorator';
import { QuerySlotAll } from '../../../Decorators/QuerySlotDecorator';
import { CustomElement } from '../../Abstracts/CustomElement';
import { StackElement } from '../../Layouts/Stack/StackElement';
import { TextElement } from '../../Primitives/Text/TextElement';
import { MenuItemElement } from './MenuItemElement';
import { menuItemGroupElementTemplate } from './MenuItemGroupElementTemplate';
import { menuItemGroupElementJoyStyle } from './Themes/MenuItemGroupElement.Joy';
import { menuItemGroupElementRetroStyle } from './Themes/MenuItemGroupElement.Retro';
import { menuItemGroupElementCosmopolitanStyle } from './Themes/MenuItemGroupElement.Cosmopolitan';
import { Themeable } from '../../../Behaviors/Themeable';
// #endregion
/**
 * Menu Item Group - A container for grouping and organizing multiple related menu items within a menu component. MenuItemGroups can be used to create visual or functional groupings of items, such as sections or categories, within a larger menu.
 *
 * @element mosaik-menu-item-group
 *
 * @slot - The default slot
 * @slot header - The header slot.
 *
 * @public
 */
let MenuItemGroupElement = class MenuItemGroupElement extends Themeable(Orientable(CustomElement)) {
    // #region Fields
    _items;
    _header;
    // #endregion
    // #region Ctor
    /**
     * @public
     */
    constructor() {
        super();
        this._header = '';
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `{@link is}` property.
     * The `{@link is}` property represents natural name of this element.
     *
     * @public
     * @static
     * @readonly
     */
    static get is() {
        return 'mosaik-menu-item-group';
    }
    /**
     * Gets or sets the `header` property.
     *
     * @public
     */
    get header() {
        return this._header;
    }
    set header(value) {
        if (this._header !== value) {
            this._header = value;
            this.requestUpdate('header');
        }
    }
    /**
     * Returns the `count` property.
     *
     * @private
     * @readonly
     */
    get count() {
        return this._items.length ?? 0;
    }
    /**
     * Returns the `items` property.
     *
     * @private
     * @readonly
     */
    get items() {
        return this._items;
    }
};
__decorate([
    QuerySlotAll(MenuItemElement.is),
    __metadata("design:type", Array)
], MenuItemGroupElement.prototype, "_items", void 0);
__decorate([
    Property({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], MenuItemGroupElement.prototype, "header", null);
MenuItemGroupElement = __decorate([
    Component({
        selector: 'mosaik-menu-item-group',
        template: menuItemGroupElementTemplate,
        themes: {
            joy: menuItemGroupElementJoyStyle,
            retro: menuItemGroupElementRetroStyle,
            cosmopolitan: menuItemGroupElementCosmopolitanStyle
        },
        imports: [
            TextElement,
            MenuItemElement,
            StackElement
        ]
    }),
    __metadata("design:paramtypes", [])
], MenuItemGroupElement);
export { MenuItemGroupElement };
//# sourceMappingURL=MenuItemGroupElement.js.map