// #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 { Labelable } from '../../../Behaviors/Labelable';
import { Sizeable } from '../../../Behaviors/Sizeable';
import { Themeable } from '../../../Behaviors/Themeable';
import { Variantable } from '../../../Behaviors/Variantable';
import { Attribute } from '../../../Decorators/AttributeDecorator';
import { Component } from '../../../Decorators/ComponentDecorator';
import { Property } from '../../../Decorators/PropertyDecorator';
import { BadgePosition } from '../../../Types/BadgePosition';
import { CustomElement } from '../../Abstracts/CustomElement';
import { TextElement } from '../../Primitives/Text/TextElement';
import { IconElement } from '../Icon/IconElement';
import { badgeElementTemplate } from './BadgeElementTemplate';
import { badgeElementCosmopolitanStyle } from './Themes/BadgeElement.Cosmopolitan';
import { badgeElementJoyStyle } from './Themes/BadgeElement.Joy';
import { badgeElementMemphisStyle } from './Themes/BadgeElement.Memphis';
// #endregion
/**
 * Badge - A compact visual indicator for displaying status, counts, labels, or notifications.
 *
 * @description
 * The Badge component provides a versatile way to display small status indicators, notification
 * counts, labels, or quick status information. It can be positioned relative to parent elements,
 * displayed as standalone indicators, or used as overlay badges. The component supports text
 * content, icon display, dot indicators, and various visual styles to convey different types
 * of information effectively.
 *
 * @name Badge
 * @element mosaik-badge
 * @category Media
 *
 * @csspart icon - The icon part.
 * @csspart label - The label part.
 *
 * @cssprop {Color} --badge-background-color - The background color of the badge
 * @cssprop {String} --badge-border-color - The border color CSS custom property.
 * @cssprop {String} --badge-border-radius - The border radius controlling badge shape
 * @cssprop {String} --badge-border-style - The border style CSS custom property.
 * @cssprop {String} --badge-border-width - The border width CSS custom property.
 * @cssprop {String} --badge-font-family - The font family CSS custom property.
 * @cssprop {String} --badge-font-letter-spacing - The font letter spacing CSS custom property.
 * @cssprop {String} --badge-font-line-height - The font line height CSS custom property.
 * @cssprop {String} --badge-font-size - The font size for badge text content
 * @cssprop {String} --badge-font-text-decoration - The font text decoration CSS custom property.
 * @cssprop {String} --badge-font-text-transform - The font text transform CSS custom property.
 * @cssprop {String} --badge-font-weight - The font weight for badge text display
 * @cssprop {Color} --badge-foreground-color - The text and icon color within the badge
 * @cssprop {String} --badge-gap - The gap CSS custom property.
 * @cssprop {String} --badge-height - The height CSS custom property.
 * @cssprop {String} --badge-padding-bottom - The padding bottom CSS custom property.
 * @cssprop {String} --badge-padding-left - The padding left CSS custom property.
 * @cssprop {String} --badge-padding-right - The padding right CSS custom property.
 * @cssprop {String} --badge-padding-top - The padding top CSS custom property.
 * @cssprop {String} --badge-shadow - The shadow CSS custom property.
 * @cssprop {String} --badge-shadow-blur - The shadow blur CSS custom property.
 * @cssprop {String} --badge-shadow-color - The shadow color CSS custom property.
 * @cssprop {String} --badge-shadow-offset-x - The shadow offset x CSS custom property.
 * @cssprop {String} --badge-shadow-offset-y - The shadow offset y CSS custom property.
 * @cssprop {String} --badge-shadow-spread - The shadow spread CSS custom property.
 * @cssprop {String} --badge-transition-duration - The transition duration CSS custom property.
 * @cssprop {String} --badge-transition-mode - The transition mode CSS custom property.
 * @cssprop {String} --badge-transition-property - The transition property CSS custom property.
 * @cssprop {String} --badge-translate - The translate CSS custom property.
 *
 * @dependency mosaik-icon - The Icon element.
 * @dependency mosaik-text - The Text element.
 *
 * @example
 * Notification count badge positioned over a button (set the badge label via the `label` JavaScript property):
 * ```html
 * <div style="position: relative; display: inline-block;">
 *   <mosaik-button></mosaik-button>
 *   <mosaik-badge appearance="solid" variant="error" overlap position="top-right"></mosaik-badge>
 * </div>
 * ```
 *
 * @example
 * Standalone dot indicator badge:
 * ```html
 * <mosaik-badge variant="success" attached></mosaik-badge>
 * ```
 *
 * @public
 */
let BadgeElement = class BadgeElement extends Themeable(Appearanceable(Variantable(Sizeable(Disableable(Labelable(CustomElement)))))) {
    // #region Fields
    _icon;
    _overlap;
    _attached;
    _position;
    // #endregion
    // #region Ctor
    /**
     * @public
     */
    constructor() {
        super();
        this._icon = '';
        this._overlap = false;
        this._attached = false;
        this._position = BadgePosition.None;
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `is` property.
     * The `is` property represents natural name of this element.
     *
     * @public
     * @static
     * @readonly
     */
    static get is() {
        return 'mosaik-badge';
    }
    /**
     * Gets or sets the `icon` property.
     *
     * @public
     */
    get icon() {
        return this._icon;
    }
    set icon(value) {
        if (this._icon !== value) {
            this._icon = value;
            this.requestUpdate('icon');
        }
    }
    /**
     * Gets or sets the `overlap` property.
     *
     * @public
     * @attr
     */
    get overlap() {
        return this._overlap;
    }
    set overlap(value) {
        if (this._overlap !== value) {
            this._overlap = value;
            this.requestUpdate('overlap');
        }
    }
    /**
     * Gets or sets the `attached` property.
     *
     * @public
     * @attr
     */
    get attached() {
        return this._attached;
    }
    set attached(value) {
        if (this._attached !== value) {
            this._attached = value;
            this.requestUpdate('attached');
        }
    }
    /**
     * Gets or sets the `position` property.
     *
     * @public
     * @attr
     */
    get position() {
        return this._position;
    }
    set position(value) {
        if (this._position !== value) {
            this._position = value;
            this.requestUpdate('position');
        }
    }
};
__decorate([
    Property({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], BadgeElement.prototype, "icon", null);
__decorate([
    Attribute({
        type: Boolean,
        useDefault: true
    }),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [Boolean])
], BadgeElement.prototype, "overlap", null);
__decorate([
    Attribute({
        type: Boolean,
        useDefault: true
    }),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [Boolean])
], BadgeElement.prototype, "attached", null);
__decorate([
    Attribute({ type: BadgePosition }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], BadgeElement.prototype, "position", null);
BadgeElement = __decorate([
    Component({
        selector: 'mosaik-badge',
        template: badgeElementTemplate,
        themes: {
            joy: badgeElementJoyStyle,
            memphis: badgeElementMemphisStyle,
            cosmopolitan: badgeElementCosmopolitanStyle
        },
        imports: [
            TextElement,
            IconElement
        ]
    }),
    __metadata("design:paramtypes", [])
], BadgeElement);
export { BadgeElement };
//# sourceMappingURL=BadgeElement.js.map