// #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 { StateBaseElement } from '../Abstracts/StateBaseElement';
import { errorStateElementTemplate } from './ErrorStateElementTemplate';
import { errorStateElementJoyStyle } from './Themes/ErrorStateElement.Joy';
import { errorStateElementMemphisStyle } from './Themes/ErrorStateElement.Memphis';
import { errorStateElementCosmopolitanStyle } from './Themes/ErrorStateElement.Cosmopolitan';
import { Themeable } from '../../../Behaviors/Themeable';
// #endregion
/**
 * ErrorState - An error handling component that displays failure states and recovery options for users.
 *
 * Presents clear error messaging with contextual information and actionable recovery steps when
 * operations fail or exceptions occur. Helps users understand what went wrong and provides
 * pathways to resolve issues or retry failed actions.
 *
 * @name ErrorStateElement
 * @element mosaik-error-state
 * @category States
 *
 * @slot - Default content area for additional error information or custom content
 * @slot actions - Action buttons for error recovery (retry, refresh, contact support, etc.)
 *
 * @csspart header - Header text container for primary error messaging
 * @csspart content - Content text container for detailed error explanation
 * @csspart code - Code container for technical error details or error codes
 * @csspart icon - Icon container for error state visual indicators
 *
 * @cssprop --error-state-header-font-family - Font family for header text
 * @cssprop --error-state-header-font-size - Font size for header text
 * @cssprop --error-state-header-font-line-height - Line height for header text
 * @cssprop --error-state-header-font-weight - Font weight for header text
 * @cssprop --error-state-header-font-letter-spacing - Letter spacing for header text
 * @cssprop --error-state-header-font-text-decoration - Text decoration for header text
 * @cssprop --error-state-header-font-text-transform - Text transform for header text
 *
 * @dependency IconElement - For displaying error icons and warning indicators
 * @dependency TextElement - For rendering header, content, and code text
 * @dependency StackElement - For layout management and content arrangement
 *
 * @example
 * ```html
 * <!-- Network error with retry -->
 * <mosaik-error-state>
 *   <mosaik-icon slot="icon" data="wifi-off"></mosaik-icon>
 *   <mosaik-text slot="header">Connection Failed</mosaik-text>
 *   <mosaik-text slot="content">Unable to connect to the server. Please check your connection and try again.</mosaik-text>
 *   <div slot="actions">
 *     <mosaik-button appearance="primary" onclick="retryConnection()">Retry</mosaik-button>
 *   </div>
 * </mosaik-error-state>
 *
 * <!-- API error with code -->
 * <mosaik-error-state>
 *   <mosaik-icon slot="icon" data="alert-circle"></mosaik-icon>
 *   <mosaik-text slot="header">Request Failed</mosaik-text>
 *   <mosaik-text slot="content">The server encountered an error processing your request.</mosaik-text>
 *   <mosaik-text slot="code">Error Code: 500</mosaik-text>
 *   <div slot="actions">
 *     <mosaik-button onclick="contactSupport()">Contact Support</mosaik-button>
 *     <mosaik-button appearance="soft" onclick="goBack()">Go Back</mosaik-button>
 *   </div>
 * </mosaik-error-state>
 *
 * <!-- Form validation error -->
 * <mosaik-error-state>
 *   <mosaik-icon slot="icon" data="exclamation-triangle"></mosaik-icon>
 *   <mosaik-text slot="header">Validation Error</mosaik-text>
 *   <mosaik-text slot="content">Please correct the highlighted fields and try again.</mosaik-text>
 *   <div slot="actions">
 *     <mosaik-button appearance="primary" onclick="validateForm()">Check Again</mosaik-button>
 *   </div>
 * </mosaik-error-state>
 *
 * <!-- File upload error -->
 * <mosaik-error-state>
 *   <mosaik-icon slot="icon" data="file-x"></mosaik-icon>
 *   <mosaik-text slot="header">Upload Failed</mosaik-text>
 *   <mosaik-text slot="content">The file could not be uploaded. Please check the file size and format.</mosaik-text>
 *   <mosaik-text slot="code">Max size: 10MB, Allowed formats: PNG, JPG, PDF</mosaik-text>
 *   <div slot="actions">
 *     <mosaik-button appearance="primary" onclick="selectNewFile()">Choose Another File</mosaik-button>
 *   </div>
 * </mosaik-error-state>
 * ```
 *
 * @public
 */
let ErrorStateElement = class ErrorStateElement extends Themeable(StateBaseElement) {
    // #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,
            memphis: errorStateElementMemphisStyle,
            cosmopolitan: errorStateElementCosmopolitanStyle
        },
        imports: [
            IconElement,
            TextElement,
            StackElement
        ]
    }),
    __metadata("design:paramtypes", [])
], ErrorStateElement);
export { ErrorStateElement };
//# sourceMappingURL=ErrorStateElement.js.map