// #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 { Alignable } from '../../../Behaviors/Alignable';
import { Fitable } from '../../../Behaviors/Fitable';
import { Gapable } from '../../../Behaviors/Gapable';
import { Orientable } from '../../../Behaviors/Orientable';
import { Reversible } from '../../../Behaviors/Reversible';
import { Themeable } from '../../../Behaviors/Themeable';
import { InlineStyleController } from '../../../Controllers/InlineStyleController';
import { Attribute } from '../../../Decorators/AttributeDecorator';
import { Component } from '../../../Decorators/ComponentDecorator';
import { LayoutElement } from '../Abstracts/LayoutElement';
import { stackElementTemplate } from './StackElementTemplate';
import { stackElementCosmopolitanStyle } from './Themes/StackElement.Cosmopolitan';
import { stackElementJoyStyle } from './Themes/StackElement.Joy';
import { stackElementMemphisStyle } from './Themes/StackElement.Memphis';
// #endregion
/**
 * Stack - A flexible layout component for arranging child elements in vertical or horizontal linear sequences.
 *
 * Provides powerful layout capabilities with support for orientation control, alignment options,
 * gap management, and responsive behavior. Ideal for creating organized linear layouts such as
 * navigation menus, button groups, content columns, and form layouts with consistent spacing.
 *
 * @name StackElement
 * @element mosaik-stack
 * @category Layouts
 *
 * @slot - Default content area for child elements to be arranged in stack layout
 *
 * @csspart container - Main stack container for layout and alignment control
 * @csspart content - Content wrapper for stack items and elements
 *
 * @cssprop {String} --stack-gap - Spacing between stack items and elements
 *
 * @example
 * ```html
 * <!-- Basic vertical stack -->
 * <mosaik-stack>
 *   <mosaik-button label="Action 1"></mosaik-button>
 *   <mosaik-button label="Action 2"></mosaik-button>
 *   <mosaik-button label="Action 3"></mosaik-button>
 * </mosaik-stack>
 *
 * <!-- Horizontal button group -->
 * <mosaik-stack orientation="horizontal" gap="small">
 *   <mosaik-button appearance="solid" label="Save"></mosaik-button>
 *   <mosaik-button appearance="plain" label="Cancel"></mosaik-button>
 * </mosaik-stack>
 *
 * <!-- Navigation menu stack -->
 * <mosaik-stack gap="none">
 *   <mosaik-cell>
 *     <span slot="start">🏠</span>
 *     <span slot="label">Dashboard</span>
 *   </mosaik-cell>
 *   <mosaik-cell>
 *     <span slot="start">👥</span>
 *     <span slot="label">Users</span>
 *   </mosaik-cell>
 * </mosaik-stack>
 * ```
 *
 * @public
 */
let StackElement = class StackElement extends Alignable(Themeable(Reversible(Orientable(Fitable(Gapable(LayoutElement)))))) {
    // #region Fields
    _inlineStyleController;
    _wrap;
    // #endregion
    // #region Ctor
    /**
     * Constructs a new instance of the `StackElement` class.
     *
     * @public
     */
    constructor() {
        super();
        this._wrap = false;
        this._inlineStyleController = new InlineStyleController(this);
        this._inlineStyleController.set('stack-gap', '0');
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `is` property.
     *
     * @public
     * @static
     * @override
     * @readonly
    */
    static get is() {
        return 'mosaik-stack';
    }
    /**
     * @public
     * @override
     */
    get gap() {
        return super.gap;
    }
    set gap(value) {
        super.gap = value;
        this._inlineStyleController.set('stack-gap', `${this.gap}`);
    }
    /**
     * Gets or sets the `wrap` property.
     *
     * @public
     * @attr
     */
    get wrap() {
        return this._wrap;
    }
    set wrap(value) {
        if (this._wrap !== value) {
            this._wrap = value;
            this.requestUpdate('wrap');
        }
    }
};
__decorate([
    Attribute({
        type: Boolean,
        useDefault: true
    }),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [Boolean])
], StackElement.prototype, "wrap", null);
StackElement = __decorate([
    Component({
        selector: 'mosaik-stack',
        template: stackElementTemplate,
        themes: {
            joy: stackElementJoyStyle,
            memphis: stackElementMemphisStyle,
            cosmopolitan: stackElementCosmopolitanStyle
        },
        imports: []
    }),
    __metadata("design:paramtypes", [])
], StackElement);
export { StackElement };
//# sourceMappingURL=StackElement.js.map