// #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 { Attribute } from '../../../Decorators/AttributeDecorator';
import { Component } from '../../../Decorators/ComponentDecorator';
import { Property } from '../../../Decorators/PropertyDecorator';
import { StackElement } from '../../Layouts/Stack/StackElement';
import { IconElement } from '../../Media/Icon/IconElement';
import { TextElement } from '../../Primitives/Text/TextElement';
import { StateElement } from '../Abstracts/StateElement';
import { errorStateElementTemplate } from './ErrorStateElementTemplate';
import { errorStateElementJoyStyle } from './Themes/ErrorStateElement.Joy';
import { errorStateElementRetroStyle } from './Themes/ErrorStateElement.Retro';
import { errorStateElementCosmopolitanStyle } from './Themes/ErrorStateElement.Cosmopolitan';
import { Themeable } from '../../../Behaviors/Themeable';
// #endregion
/**
 * Error State - A UI component used to display an error message or indicator to the user.
 *
 * @description
 * The Error State component is designed to visually convey an error or problem in the user interface.
 * It typically includes an icon, header, content, and optionally some code or detailed information. This component
 * is often used to indicate issues in forms, notifications, or status messages, helping users understand and resolve problems.
 *
 * @name ErrorState
 * @element mosaik-error-state
 * @category States
 *
 * @slot - The default slot for placing additional content or elements related to the error.
 * @slot actions - The actions slot for placing actionable elements such as buttons or links for error resolution.
 *
 * @csspart header - The header part of the error state component.
 * @csspart content - The content part of the error state component.
 * @csspart code - The code part for displaying error codes or detailed information.
 * @csspart icon - The icon part of the error state component.
 *
 * @cssprop {String} --error-state-header-font-family - The font family for the header text.
 * @cssprop {String} --error-state-header-font-size - The font size for the header text.
 * @cssprop {String} --error-state-header-font-line-height - The line height for the header text.
 * @cssprop {String} --error-state-header-font-weight - The font weight for the header text.
 * @cssprop {String} --error-state-header-font-letter-spacing - The letter spacing for the header text.
 * @cssprop {String} --error-state-header-font-text-decoration - The text decoration for the header text.
 * @cssprop {String} --error-state-header-font-text-transform - The text transform for the header text.
 *
 * @dependency {IconElement} mosaik-icon - The Icon component, used for displaying the error icon.
 * @dependency {TextElement} mosaik-text - The Text component, used for displaying the header, content, and code text.
 * @dependency {StackElement} mosaik-stack - The Stack component, used for layout management of the icon, header, and content.
 *
 * @example
 * ```html
 * <mosaik-error-state>
 *   <mosaik-icon slot="icon" name="error"></mosaik-icon>
 *   <mosaik-text slot="header">Error</mosaik-text>
 *   <mosaik-text slot="content">An unexpected error has occurred. Please try again later.</mosaik-text>
 *   <mosaik-text slot="code">Error Code: 12345</mosaik-text>
 *   <div slot="actions">
 *     <mosaik-button>Retry</mosaik-button>
 *   </div>
 * </mosaik-error-state>
 * ```
 *
 * @public
 */
let ErrorStateElement = class ErrorStateElement extends Themeable(StateElement) {
    // #region Fields
    _icon;
    _header;
    _code;
    // #endregion
    // #region Ctor
    /**
     * Constructs a new instance of the `ErrorStateElement` class.
     *
     * @public
     */
    constructor() {
        super();
        this._icon = '';
        this._header = '';
        this._code = '';
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `is` property.
     *
     * @public
     * @static
     * @readonly
    */
    static get is() {
        return 'mosaik-error-state';
    }
    /**
     * Gets or sets the error icon property of the state.
     *
     * @public
     */
    get icon() {
        return this._icon;
    }
    set icon(value) {
        if (this._icon !== value) {
            this._icon = value;
        }
    }
    /**
     * Gets or sets the error header property of the state.
     *
     * @public
     */
    get header() {
        return this._header;
    }
    set header(value) {
        if (this._header !== value) {
            this._header = value;
        }
    }
    /**
     * Gets or sets the error code property of the state.
     *
     * @public
     * @attr
     */
    get code() {
        return this._code;
    }
    set code(value) {
        if (this._code !== value) {
            this._code = value;
        }
    }
};
__decorate([
    Property({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], ErrorStateElement.prototype, "icon", null);
__decorate([
    Property({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], ErrorStateElement.prototype, "header", null);
__decorate([
    Attribute({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], ErrorStateElement.prototype, "code", null);
ErrorStateElement = __decorate([
    Component({
        selector: 'mosaik-error-state',
        template: errorStateElementTemplate,
        themes: {
            joy: errorStateElementJoyStyle,
            retro: errorStateElementRetroStyle,
            cosmopolitan: errorStateElementCosmopolitanStyle
        },
        imports: [
            IconElement,
            TextElement,
            StackElement
        ]
    }),
    __metadata("design:paramtypes", [])
], ErrorStateElement);
export { ErrorStateElement };
//# sourceMappingURL=ErrorStateElement.js.map