// #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 { Appearanceable } from '../../../Behaviors/Appearanceable';
import { Disableable } from '../../../Behaviors/Disableable';
import { Elevatable } from '../../../Behaviors/Elevatable';
import { Fitable } from '../../../Behaviors/Fitable';
import { Insetable } from '../../../Behaviors/Insetable';
import { Orientable } from '../../../Behaviors/Orientable';
import { Slottable } from '../../../Behaviors/Slottable';
import { TextFormattable } from '../../../Behaviors/TextFormattable';
import { Attribute } from '../../../Decorators/AttributeDecorator';
import { Component } from '../../../Decorators/ComponentDecorator';
import { Property } from '../../../Decorators/PropertyDecorator';
import { Orientation } from '../../../Types/Orientation';
import { CustomElement } from '../../Abstracts/CustomElement';
import { ElevationElement } from '../../Primitives/Elevation/ElevationElement';
import { CardActionsElement } from './CardActionsElement';
import { CardContentElement } from './CardContentElement';
import { cardElementTemplate } from './CardElementTemplate';
import { CardHeaderElement } from './CardHeaderElement';
import { CardSubTitleElement } from './CardSubTitleElement';
import { CardTitleElement } from './CardTitleElement';
import { Themeable } from '../../../../Controls/Behaviors/Themeable';
import { cardElementCosmopolitanStyle } from './Themes/CardElement.Cosmopolitan';
import { cardElementJoyStyle } from './Themes/CardElement.Joy';
import { cardElementRetroStyle } from './Themes/CardElement.Retro';
import { Selectable } from '../../../Behaviors/Selectable';
// #endregion
/**
 * Card - A versatile container component for organizing related content in a visually distinct layout.
 *
 * Provides structured sections for media, headers, content, and actions within a cohesive container.
 * Supports elevation effects, selectable states, and flexible content arrangement.
 * Essential for displaying information hierarchies like product listings, user profiles, and content previews.
 *
 * @name CardElement
 * @element mosaik-card
 * @category Grouping
 *
 * @slot cover - Primary visual content like hero images or graphics positioned at the top
 * @slot media - Additional media content such as images, videos, or rich content
 * @slot header - Header section typically containing titles and navigation elements
 * @slot content - Main content body for text, descriptions, or detailed information
 * @slot actions - Action buttons or interactive elements for user engagement
 * @slot footer - Footer section for supplementary information, links, or metadata
 *
 * @csspart elevation - Container for card elevation and shadow effects
 * @csspart cover - Cover image or media container at the top of the card
 * @csspart heading - Header section container for titles and subtitles
 * @csspart content - Main content area container
 * @csspart actions - Actions section container for buttons and controls
 * @csspart footer - Footer section container for additional content
 *
 * @cssprop --card-background-color - Background color of the card container
 * @cssprop --card-border-radius - Border radius for card corners
 * @cssprop --card-padding - Internal padding for card content
 * @cssprop --card-elevation - Elevation level for shadow effects
 * @cssprop --card-border-color - Border color around the card
 * @cssprop --card-border-width - Border width for card outline
 *
 * @dependency ElevationElement - Provides elevation and shadow effects
 * @dependency CardHeaderElement - Structured header layout component
 * @dependency CardContentElement - Main content area component
 * @dependency CardActionsElement - Actions section layout component
 * @dependency CardTitleElement - Title text component
 * @dependency CardSubTitleElement - Subtitle text component
 *
 * @example
 * ```html
 * <!-- Basic content card -->
 * <mosaik-card>
 *   <mosaik-card-header slot="header">
 *     <mosaik-card-title>Product Name</mosaik-card-title>
 *     <mosaik-card-sub-title>Premium Edition</mosaik-card-sub-title>
 *   </mosaik-card-header>
 *   <mosaik-card-content slot="content">
 *     <p>Detailed product description and features.</p>
 *   </mosaik-card-content>
 *   <mosaik-card-actions slot="actions">
 *     <mosaik-button>Learn More</mosaik-button>
 *     <mosaik-button appearance="primary">Buy Now</mosaik-button>
 *   </mosaik-card-actions>
 * </mosaik-card>
 *
 * <!-- Media card with cover -->
 * <mosaik-card elevation="2">
 *   <img slot="cover" src="hero.jpg" alt="Product image">
 *   <div slot="content">
 *     <h3>Article Title</h3>
 *     <p>Article summary and preview content.</p>
 *   </div>
 *   <div slot="footer">
 *     <span>Published: March 2024</span>
 *   </div>
 * </mosaik-card>
 *
 * <!-- Selectable card -->
 * <mosaik-card selectable selected>
 *   <div slot="header">
 *     <h4>Option A</h4>
 *   </div>
 *   <div slot="content">
 *     <p>This option provides the best value.</p>
 *   </div>
 * </mosaik-card>
 * ```
 *
 * @public
 */
let CardElement = class CardElement extends Themeable(Elevatable(Appearanceable(Insetable(Disableable(Fitable(Orientable(TextFormattable(Slottable(Selectable(CustomElement)))))))))) {
    // #region Fields
    _header;
    _subHeader;
    _content;
    _inlineMedia;
    // #endregion
    // #region Ctor
    /**
     * @public
     */
    constructor() {
        super();
        this._header = '';
        this._subHeader = '';
        this._content = '';
        this._inlineMedia = false;
        // TODO: REMARK: This is a workaround for the issue with the docs generation.
        // If we set the orientation property like this `this.orientation = Orientation.Vertical;` the
        // docs generation will generates a wrong type.
        Object.assign(this, { orientation: Orientation.Vertical });
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `is` property.
     *
     * @public
     * @static
     * @readonly
    */
    static get is() {
        return 'mosaik-card';
    }
    /**
     * The `header` property represents the header of the card.
     * It will inherited automatically by the `CardHeaderElement`.
     *
     * @public
     */
    get header() {
        return this._header;
    }
    set header(value) {
        if (this._header !== value) {
            this._header = value;
            this.requestUpdate('header');
        }
    }
    /**
     * The `subHeader` property represents the sub header of the card.
     * It will inherited automatically by the `CardSubTitleElement`.
     *
     * @public
     */
    get subHeader() {
        return this._subHeader;
    }
    set subHeader(value) {
        if (this._subHeader !== value) {
            this._subHeader = value;
            this.requestUpdate('subHeader');
        }
    }
    /**
     * Gets or sets the `content` property.
     *
     * @public
     */
    get content() {
        return this._content;
    }
    set content(value) {
        if (this._content !== value) {
            this._content = value;
            this.requestUpdate('content');
        }
    }
    /**
     * Gets or sets the `inlineMedia` property.
     *
     * @public
     * @attr
     */
    get inlineMedia() {
        return this._inlineMedia;
    }
    set inlineMedia(value) {
        if (this._inlineMedia !== value) {
            this._inlineMedia = value;
            this.requestUpdate('inlineMedia');
        }
    }
};
__decorate([
    Property({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], CardElement.prototype, "header", null);
__decorate([
    Property({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], CardElement.prototype, "subHeader", null);
__decorate([
    Property({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], CardElement.prototype, "content", null);
__decorate([
    Attribute({
        type: Boolean,
        useDefault: true
    }),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [Boolean])
], CardElement.prototype, "inlineMedia", null);
CardElement = __decorate([
    Component({
        selector: 'mosaik-card',
        template: cardElementTemplate,
        themes: {
            joy: cardElementJoyStyle,
            retro: cardElementRetroStyle,
            cosmopolitan: cardElementCosmopolitanStyle
        },
        imports: [
            CardContentElement,
            CardHeaderElement,
            CardSubTitleElement,
            CardTitleElement,
            CardActionsElement,
            ElevationElement
        ]
    }),
    __metadata("design:paramtypes", [])
], CardElement);
export { CardElement };
//# sourceMappingURL=CardElement.js.map