// #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 { Sizeable } from '../../../Behaviors/Sizeable';
import { Variantable } from '../../../Behaviors/Variantable';
import { Attribute } from '../../../Decorators/AttributeDecorator';
import { Component } from '../../../Decorators/ComponentDecorator';
import { Property } from '../../../Decorators/PropertyDecorator';
import { Appearance } from '../../../Types/Appearance';
import { CustomElement } from '../../Abstracts/CustomElement';
import { iconElementTemplate } from './IconElementTemplate';
import { iconElementJoyStyle } from './Themes/IconElement.Joy';
import { iconElementRetroStyle } from './Themes/IconElement.Retro';
import { iconElementCosmopolitanStyle } from './Themes/IconElement.Cosmopolitan';
import { Themeable } from '../../../Behaviors/Themeable';
// #endregion
/**
 * Icon - A scalable vector graphics element for displaying symbolic imagery and visual communication.
 *
 * Renders SVG icons from path data with support for theming, sizing, rotation, and various appearances.
 * Essential for user interface iconography, providing consistent visual language across applications.
 * Features built-in accessibility support and performance optimization for vector graphics.
 *
 * @name IconElement
 * @element mosaik-icon
 * @category Media
 *
 * @csspart symbol - The internal SVG symbol container element
 *
 * @cssprop --icon-font-family - Font family for icon rendering
 * @cssprop --icon-font-size - Base font size for icon scaling
 * @cssprop --icon-font-weight - Font weight for icon strokes
 * @cssprop --icon-padding-top - Top padding around icon
 * @cssprop --icon-padding-right - Right padding around icon
 * @cssprop --icon-padding-bottom - Bottom padding around icon
 * @cssprop --icon-padding-left - Left padding around icon
 * @cssprop --icon-gap - Spacing between icon and adjacent content
 * @cssprop --icon-transition-duration - Animation duration for state changes
 * @cssprop --icon-transition-mode - Animation timing function
 * @cssprop --icon-transition-property - CSS properties to animate
 * @cssprop --icon-foreground-color - Icon color and stroke color
 * @cssprop --icon-background-color - Background color behind icon
 * @cssprop --icon-border-color - Border color around icon
 * @cssprop --icon-border-width - Border width around icon
 * @cssprop --icon-border-radius - Border radius for icon container
 * @cssprop --icon-border-style - Border style (solid, dashed, etc.)
 * @cssprop --icon-shadow - Shadow effect applied to icon
 * @cssprop --icon-size - Overall size scaling for the icon
 *
 * @example
 * ```html
 * <!-- Basic icon -->
 * <mosaik-icon data="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"></mosaik-icon>
 *
 * <!-- Rotated icon with appearance -->
 * <mosaik-icon
 *   data="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"
 *   angel="180"
 *   appearance="primary">
 * </mosaik-icon>
 *
 * <!-- Disabled icon -->
 * <mosaik-icon
 *   data="M12,2A3,3 0 0,1 15,5V11A3,3 0 0,1 12,14A3,3 0 0,1 9,11V5A3,3 0 0,1 12,2Z"
 *   disabled>
 * </mosaik-icon>
 *
 * <!-- Inline icon with text -->
 * <span>
 *   Click here
 *   <mosaik-icon
 *     data="M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z"
 *     inline
 *     size="sm">
 *   </mosaik-icon>
 * </span>
 * ```
 *
 * @public
 */
let IconElement = class IconElement extends Themeable(Variantable(Sizeable(Appearanceable(Disableable(CustomElement))))) {
    // #region Fields
    _data;
    _angel;
    _inline;
    _readonly;
    // #endregion
    // #region Ctor
    /**
     * Constructs a new instance of the `IconElement` class.
     *
     * @public
     */
    constructor() {
        super();
        this._data = '';
        this._angel = 0;
        this._inline = false;
        this._readonly = false;
        // TODO: REMARK: This is a workaround for the issue with the docs generation.
        // If we set the orientation property like this `this.appearance = Appearance.Plain;` the
        // docs generation will generates a wrong tpye.
        Object.assign(this, { appearance: Appearance.Plain });
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `is` property.
     *
     * @public
     * @static
     * @readonly
    */
    static get is() {
        return 'mosaik-icon';
    }
    /**
     * Gets or sets the `data` property.
     *
     * @public
     */
    get data() {
        return this._data;
    }
    set data(value) {
        if (this._data !== value) {
            this._data = value;
            this.requestUpdate('data');
        }
    }
    /**
     * Gets or sets the `angel` property.
     *
     * @public
     * @attr
     */
    get angel() {
        return this._angel;
    }
    set angel(value) {
        if (this._angel !== value) {
            this._angel = value;
            this.requestUpdate('angel');
        }
    }
    /**
     * Gets or sets the `inile` property.
     *
     * @public
     * @attr
     */
    get inline() {
        return this._inline;
    }
    set inline(value) {
        if (this._inline !== value) {
            this._inline = value;
            this.requestUpdate('inline');
        }
    }
    /**
     * Gets or sets the `readonly` property.
     *
     * @public
     * @attr
     */
    get readonly() {
        return this._readonly;
    }
    set readonly(value) {
        if (this._readonly !== value) {
            this._readonly = value;
            this.requestUpdate('readonly');
        }
    }
};
__decorate([
    Property({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], IconElement.prototype, "data", null);
__decorate([
    Attribute({ type: Number }),
    __metadata("design:type", Number),
    __metadata("design:paramtypes", [Number])
], IconElement.prototype, "angel", null);
__decorate([
    Attribute({
        type: Boolean,
        useDefault: true
    }),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [Boolean])
], IconElement.prototype, "inline", null);
__decorate([
    Attribute({
        type: Boolean,
        useDefault: true
    }),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [Boolean])
], IconElement.prototype, "readonly", null);
IconElement = __decorate([
    Component({
        selector: 'mosaik-icon',
        template: iconElementTemplate,
        themes: {
            joy: iconElementJoyStyle,
            retro: iconElementRetroStyle,
            cosmopolitan: iconElementCosmopolitanStyle
        },
        imports: []
    }),
    __metadata("design:paramtypes", [])
], IconElement);
export { IconElement };
//# sourceMappingURL=IconElement.js.map