// #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 { 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 { errorStateElementCosmopolitanStyle } from './Themes/ErrorStateElement.Cosmopolitan';
import { errorStateElementJoyStyle } from './Themes/ErrorStateElement.Joy';
import { errorStateElementMemphisStyle } from './Themes/ErrorStateElement.Memphis';
// #endregion
/**
 * ErrorState - An error handling component that displays failure states and recovery options for users.
 *
 * @description
 * The ErrorState component presents clear error messaging with contextual information and actionable
 * recovery steps when operations fail or exceptions occur. It helps users understand what went wrong
 * and provides pathways to resolve issues or retry failed actions. The component supports customizable
 * error icons, primary and detailed error messages, technical error codes for debugging, and action
 * buttons for recovery operations such as retry, refresh, or contact support. It's designed to
 * transform frustrating error experiences into opportunities for resolution and support.
 *
 * @name ErrorState
 * @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, go back, etc.)
 *
 * @csspart icon - The icon container for error state visual indicators
 * @csspart header - The header text container for primary error messaging
 * @csspart content - The content text container for detailed error explanation
 * @csspart code - The code container for technical error details or error codes
 * @csspart innerStack - The internal stack container for action slot elements
 *
 * @cssprop {String} --error-state-foreground-color - The text color for error state content
 * @cssprop {String} --error-state-gap - The spacing between icon, text, and action elements
 * @cssprop {String} --error-state-header-font-family - The font family for header text
 * @cssprop {String} --error-state-header-font-size - The font size for header text
 * @cssprop {String} --error-state-header-font-line-height - The line height for header text
 * @cssprop {String} --error-state-header-font-weight - The font weight for header text
 * @cssprop {String} --error-state-header-font-letter-spacing - The letter spacing for header text
 * @cssprop {String} --error-state-header-font-text-decoration - The text decoration style for header text
 * @cssprop {String} --error-state-header-font-text-transform - The text transformation style for header text
 * @cssprop {String} --error-state-padding-top - The top padding inside the error state container
 * @cssprop {String} --error-state-padding-right - The right padding inside the error state container
 * @cssprop {String} --error-state-padding-bottom - The bottom padding inside the error state container
 * @cssprop {String} --error-state-padding-left - The left padding inside the error state container
 *
 * @dependency {IconElement} - For displaying error icons and warning indicators
 * @dependency {TextElement} - For rendering header, content, and code text messages
 * @dependency {StackElement} - For layout management and content arrangement
 *
 * @example
 * Network error with retry:
 * ```html
 * <mosaik-error-state icon="wifi-off" header="Connection Failed"
 *                     content="Unable to connect to the server. Please check your connection and try again.">
 *   <mosaik-button slot="actions" appearance="primary" onclick="retryConnection()">Retry</mosaik-button>
 * </mosaik-error-state>
 * ```
 *
 * @example
 * API error with error code:
 * ```html
 * <mosaik-error-state icon="alert-circle" header="Request Failed"
 *                     content="The server encountered an error processing your request."
 *                     code="Error Code: 500">
 *   <mosaik-button slot="actions" onclick="contactSupport()">Contact Support</mosaik-button>
 *   <mosaik-button slot="actions" appearance="soft" onclick="goBack()">Go Back</mosaik-button>
 * </mosaik-error-state>
 * ```
 *
 * @example
 * Form validation error:
 * ```html
 * <mosaik-error-state icon="exclamation-triangle" header="Validation Error"
 *                     content="Please correct the highlighted fields and try again.">
 *   <mosaik-button slot="actions" appearance="primary" onclick="validateForm()">Check Again</mosaik-button>
 * </mosaik-error-state>
 * ```
 *
 * @example
 * File upload error with constraints:
 * ```html
 * <mosaik-error-state icon="file-x" header="Upload Failed"
 *                     content="The file could not be uploaded. Please check the file size and format."
 *                     code="Max size: 10MB, Allowed formats: PNG, JPG, PDF">
 *   <mosaik-button slot="actions" appearance="primary" onclick="selectNewFile()">Choose Another File</mosaik-button>
 * </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 `icon` property.
     * The icon SVG path data for the error state visual indicator.
     * The default value is an empty string, which displays a default error circle icon.
     *
     * @public
     */
    get icon() {
        return this._icon;
    }
    set icon(value) {
        if (this._icon !== value) {
            this._icon = value;
        }
    }
    /**
     * Gets or sets the `header` property.
     * The primary error message displayed to users.
     * The default value is an empty string, which means no header is displayed.
     *
     * @public
     */
    get header() {
        return this._header;
    }
    set header(value) {
        if (this._header !== value) {
            this._header = value;
        }
    }
    /**
     * Gets or sets the `code` property.
     * The technical error code or additional error details for debugging.
     * The default value is an empty string, which means no error code is displayed.
     *
     * @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