// #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 { Disableable } from '../../../Behaviors/Disableable';
import { Stickable } from '../../../Behaviors/Stickable';
import { Attribute } from '../../../Decorators/AttributeDecorator';
import { Component } from '../../../Decorators/ComponentDecorator';
import { QuerySlotAll } from '../../../Decorators/QuerySlotDecorator';
import { CustomElement } from '../../Abstracts/CustomElement';
import { StickyElement } from '../../Primitives/Sticky/StickyElement';
import { TextElement } from '../../Primitives/Text/TextElement';
import { ListItemElement } from './ListItemElement';
import { listItemGroupElementTemplate } from './ListItemGroupElementTemplate';
import { listItemGroupElementJoyStyle } from './Themes/ListItemGroupElement.Joy';
import { listItemGroupElementRetroStyle } from './Themes/ListItemGroupElement.Retro';
import { listItemGroupElementCosmopolitanStyle } from './Themes/ListItemGroupElement.Cosmopolitan';
import { Themeable } from '../../../Behaviors/Themeable';
// #endregion
/**
 * List Item Group - A container for grouping and organizing multiple related list items within a list component. ListItemGroups can be used to create visual or functional groupings of items, such as sections or categories, within a larger list.
 *
 * @element mosaik-list-item-group
 *
 * @slot - The default slot
 * @slot header - The header slot.
 *
 * @public
 */
let ListItemGroupElement = class ListItemGroupElement extends Themeable(Stickable(Disableable(CustomElement))) {
    // #region Fields
    _items;
    _header;
    // #endregion
    // #region Ctor
    /**
     * @public
     */
    constructor() {
        super();
        this._items = [];
        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-list-item-group';
    }
    /**
     * Gets or sets the `header` property.
     *
     * @public
     * @attr
     */
    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(ListItemElement.is),
    __metadata("design:type", Array)
], ListItemGroupElement.prototype, "_items", void 0);
__decorate([
    Attribute({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], ListItemGroupElement.prototype, "header", null);
ListItemGroupElement = __decorate([
    Component({
        selector: 'mosaik-list-item-group',
        template: listItemGroupElementTemplate,
        themes: {
            joy: listItemGroupElementJoyStyle,
            retro: listItemGroupElementRetroStyle,
            cosmopolitan: listItemGroupElementCosmopolitanStyle
        },
        imports: [
            TextElement,
            StickyElement
        ]
    }),
    __metadata("design:paramtypes", [])
], ListItemGroupElement);
export { ListItemGroupElement };
//# sourceMappingURL=ListItemGroupElement.js.map