// #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 { Themeable } from '../../../Behaviors/Themeable';
import { Fitable } from '../../../Behaviors/Fitable';
import { Component } from '../../../Decorators/ComponentDecorator';
import { Property } from '../../../Decorators/PropertyDecorator';
import { CustomElement } from '../../Abstracts/CustomElement';
import { masonryElementTemplate } from './MasonryElementTemplate';
import { masonryElementJoyStyle } from './Themes/MasonryElement.Joy';
import { masonryElementRetroStyle } from './Themes/MasonryElement.Retro';
import { masonryElementCosmopolitanStyle } from './Themes/MasonryElement.Cosmopolitan';
import { Gapable } from '../../../Behaviors/Gapable';
// #endregion
/**
 * Masonry - A dynamic grid layout system that arranges elements of varying heights in optimal vertical columns.
 *
 * @description
 * The Masonry layout component creates a Pinterest-style grid where elements are arranged in columns with
 * optimal space utilization, minimizing gaps and creating visually pleasing layouts. Unlike traditional
 * grid systems, Masonry dynamically positions elements to fill available space efficiently, making it
 * perfect for content with varying heights. The component supports configurable column counts, gap spacing,
 * responsive behavior, and automatic height distribution. It handles dynamic content addition and removal,
 * maintains layout integrity during window resizing, and provides smooth transitions. Essential for image
 * galleries, card layouts, dashboard widgets, blog post grids, and any interface displaying heterogeneous
 * content that needs optimal space utilization.
 *
 * @name Masonry
 * @element mosaik-masonry
 * @category Layouts
 *
 * @slot - The default slot for elements to be arranged in masonry layout.
 *
 * @cssprop {String} --masonry-columns - The number of columns in the masonry grid.
 * @cssprop {String} --masonry-gap - The gap between masonry items.
 *
 * @example
 * ```html
 * <mosaik-masonry columns="3" gap="16px">
 *   <div>Short content</div>
 *   <div>Much longer content that spans multiple lines and creates different heights</div>
 *   <div>Medium content</div>
 *   <div>Another short item</div>
 * </mosaik-masonry>
 * ```
 *
 * @example
 * ```html
 * <mosaik-masonry columns="4" gap="20px">
 *   <mosaik-card>Card 1</mosaik-card>
 *   <mosaik-card>Card 2 with more content</mosaik-card>
 *   <mosaik-card>Card 3</mosaik-card>
 * </mosaik-masonry>
 * ```
 *
 * @public
 */
let MasonryElement = class MasonryElement extends Themeable(Fitable(Gapable(CustomElement))) {
    // #region Fields
    _columns;
    // #endregion
    // #region Ctor
    /**
     * @public
     */
    constructor() {
        super();
        this._columns = 1;
    }
    // #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-masonry';
    }
    /**
     * Gets or sets the `columns` property.
     *
     * @public
     */
    get columns() {
        return this._columns;
    }
    set columns(value) {
        if (this._columns !== value) {
            this._columns = value;
            this.requestUpdate('columns');
        }
    }
};
__decorate([
    Property({ type: Number }),
    __metadata("design:type", Number),
    __metadata("design:paramtypes", [Number])
], MasonryElement.prototype, "columns", null);
MasonryElement = __decorate([
    Component({
        selector: 'mosaik-masonry',
        template: masonryElementTemplate,
        themes: {
            joy: masonryElementJoyStyle,
            retro: masonryElementRetroStyle,
            cosmopolitan: masonryElementCosmopolitanStyle
        },
        imports: []
    }),
    __metadata("design:paramtypes", [])
], MasonryElement);
export { MasonryElement };
//# sourceMappingURL=MasonryElement.js.map