// #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 { 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 { badgeElementJoyStyle } from './Themes/BadgeElement.Joy';
import { badgeElementMemphisStyle } from './Themes/BadgeElement.Memphis';
import { badgeElementCosmopolitanStyle } from './Themes/BadgeElement.Cosmopolitan';
import { Themeable } from '../../../Behaviors/Themeable';
// #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 badge - The main badge container element providing the visual foundation
 * @csspart content - The inner content container for text, icons, or dot indicators
 *
 * @cssprop {String} --badge-background-color - The background color of the badge
 * @cssprop {String} --badge-foreground-color - The text and icon color within the badge
 * @cssprop {String} --badge-border-radius - The border radius controlling badge shape
 * @cssprop {String} --badge-padding - The internal padding around badge content
 * @cssprop {String} --badge-min-width - The minimum width ensuring proper circular badges
 * @cssprop {String} --badge-font-size - The font size for badge text content
 * @cssprop {String} --badge-font-weight - The font weight for badge text display
 *
 * @dependency {TextElement} - Text component for rendering badge labels and content
 * @dependency {IconElement} - Icon component for displaying badge icons and symbols
 *
 * @example
 * Notification count badge positioned over a button:
 * ```html
 * <div style="position: relative; display: inline-block;">
 *   <button>Messages</button>
 *   <mosaik-badge label="3" appearance="danger" overlap position="top-right"></mosaik-badge>
 * </div>
 * ```
 *
 * @example
 * Status badge with different appearances:
 * ```html
 * <mosaik-badge label="Active" appearance="success" size="sm" standalone></mosaik-badge>
 * <mosaik-badge label="Pending" appearance="warning" size="sm" standalone></mosaik-badge>
 * <mosaik-badge label="Error" appearance="danger" size="sm" standalone></mosaik-badge>
 * ```
 *
 * @example
 * Icon badge for status indication:
 * ```html
 * <mosaik-badge icon="check" appearance="primary" size="md"></mosaik-badge>
 * ```
 *
 * @example
 * Dot indicator for simple notifications:
 * ```html
 * <div style="position: relative;">
 *   <mosaik-icon data="bell"></mosaik-icon>
 *   <mosaik-badge appearance="warning" overlap position="top-right" size="xs"></mosaik-badge>
 * </div>
 * ```
 *
 * @example
 * Large count badge with overflow handling:
 * ```html
 * <div class="notification-container">
 *   <mosaik-icon data="mail"></mosaik-icon>
 *   <mosaik-badge label="99+" appearance="danger" position="top-right" size="sm"></mosaik-badge>
 * </div>
 * ```
 *
 * @public
 */
let BadgeElement = class BadgeElement extends Themeable(Appearanceable(Variantable(Sizeable(Disableable(Labelable(CustomElement)))))) {
    // #region Fields
    _icon;
    _overlap;
    _standalone;
    _position;
    // #endregion
    // #region Ctor
    /**
     * @public
     */
    constructor() {
        super();
        this._icon = '';
        this._overlap = false;
        this._standalone = false;
        this._position = BadgePosition.None;
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `{@link is}` property.
     * The `{@link 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 `standalone` property.
     *
     * @public
     * @attr
     */
    get standalone() {
        return this._standalone;
    }
    set standalone(value) {
        if (this._standalone !== value) {
            this._standalone = value;
            this.requestUpdate('standalone');
        }
    }
    /**
     * 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, "standalone", 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