// #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 { Fitable } from '../../../Behaviors/Fitable';
import { Orientable } from '../../../Behaviors/Orientable';
import { Reversible } from '../../../Behaviors/Reversible';
import { Attribute } from '../../../Decorators/AttributeDecorator';
import { Component } from '../../../Decorators/ComponentDecorator';
import { HorizontalAlignment } from '../../../Types/HorizontalAlignment';
import { VerticalAlignment } from '../../../Types/VerticalAlignment';
import { LayoutElement } from '../Abstracts/LayoutElement';
import { stackElementTemplate } from './StackElementTemplate';
import { stackElementJoyStyle } from './Themes/StackElement.Joy';
import { stackElementMemphisStyle } from './Themes/StackElement.Memphis';
import { stackElementCosmopolitanStyle } from './Themes/StackElement.Cosmopolitan';
import { Themeable } from '../../../Behaviors/Themeable';
import { Gapable } from '../../../Behaviors/Gapable';
// #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 --stack-gap - Spacing between stack items and elements
 *
 * @example
 * ```html
 * <!-- Basic vertical stack -->
 * <mosaik-stack>
 *   <mosaik-button>Action 1</mosaik-button>
 *   <mosaik-button>Action 2</mosaik-button>
 *   <mosaik-button>Action 3</mosaik-button>
 * </mosaik-stack>
 *
 * <!-- Horizontal button group -->
 * <mosaik-stack orientation="horizontal" gap="small">
 *   <mosaik-button appearance="primary">Save</mosaik-button>
 *   <mosaik-button appearance="soft">Cancel</mosaik-button>
 *   <mosaik-button appearance="ghost">Reset</mosaik-button>
 * </mosaik-stack>
 *
 * <!-- Card content stack -->
 * <mosaik-stack gap="medium" alignment="stretch">
 *   <mosaik-text variant="headline">Card Title</mosaik-text>
 *   <mosaik-text variant="body">
 *     Card content with multiple lines of text that should be properly stacked
 *     with consistent spacing between elements.
 *   </mosaik-text>
 *   <mosaik-stack orientation="horizontal" gap="small" alignment="end">
 *     <mosaik-button size="small">Learn More</mosaik-button>
 *     <mosaik-button appearance="primary" size="small">Get Started</mosaik-button>
 *   </mosaik-stack>
 * </mosaik-stack>
 *
 * <!-- Navigation menu stack -->
 * <mosaik-stack gap="none">
 *   <mosaik-cell>
 *     <mosaik-icon slot="start" data="home"></mosaik-icon>
 *     <mosaik-text slot="label">Dashboard</mosaik-text>
 *   </mosaik-cell>
 *   <mosaik-cell>
 *     <mosaik-icon slot="start" data="users"></mosaik-icon>
 *     <mosaik-text slot="label">Users</mosaik-text>
 *   </mosaik-cell>
 *   <mosaik-cell>
 *     <mosaik-icon slot="start" data="settings"></mosaik-icon>
 *     <mosaik-text slot="label">Settings</mosaik-text>
 *   </mosaik-cell>
 * </mosaik-stack>
 *
 * <!-- Form field stack -->
 * <mosaik-stack gap="large" fit="width">
 *   <mosaik-text-box label="First Name" placeholder="Enter first name"></mosaik-text-box>
 *   <mosaik-text-box label="Last Name" placeholder="Enter last name"></mosaik-text-box>
 *   <mosaik-text-box label="Email" type="email" placeholder="Enter email"></mosaik-text-box>
 * </mosaik-stack>
 *
 * <!-- Centered content stack -->
 * <mosaik-stack
 *   alignment="center"
 *   justify="center"
 *   style="min-height: 200px;">
 *   <mosaik-icon data="check-circle" size="large" style="color: green;"></mosaik-icon>
 *   <mosaik-text variant="headline">Success!</mosaik-text>
 *   <mosaik-text variant="body" alignment="center">
 *     Your action has been completed successfully.
 *   </mosaik-text>
 * </mosaik-stack>
 * ```
 *
 * @public
 */
let StackElement = class StackElement extends Themeable(Reversible(Orientable(Fitable(Gapable(LayoutElement))))) {
    // #region Fields
    _horizontalAlignment;
    _verticalAlignment;
    _wrap;
    // #endregion
    // #region Ctor
    /**
     * Constructs a new instance of the `StackElement` class.
     *
     * @public
     */
    constructor() {
        super();
        this._horizontalAlignment = HorizontalAlignment.Stretch;
        this._verticalAlignment = VerticalAlignment.Stretch;
        this._wrap = false;
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `is` property.
     *
     * @public
     * @static
     * @override
     * @readonly
    */
    static get is() {
        return 'mosaik-stack';
    }
    /**
     * Gets or sets the `horizontalAlignment` property.
     *
     * @public
     * @attr
     */
    get horizontalAlignment() {
        return this._horizontalAlignment;
    }
    set horizontalAlignment(value) {
        if (this._horizontalAlignment !== value) {
            this._horizontalAlignment = value;
            this.requestUpdate('horizontalAlignment');
        }
    }
    /**
     * Gets or sets the `verticalAlignment` property.
     *
     * @public
     * @attr
     */
    get verticalAlignment() {
        return this._verticalAlignment;
    }
    set verticalAlignment(value) {
        if (this._verticalAlignment !== value) {
            this._verticalAlignment = value;
            this.requestUpdate('verticalAlignment');
        }
    }
    /**
     * 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: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], StackElement.prototype, "horizontalAlignment", null);
__decorate([
    Attribute({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], StackElement.prototype, "verticalAlignment", null);
__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