// #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 { 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 { CustomElement } from '../../Abstracts/CustomElement';
import { IconElement } from '../../Media/Icon/IconElement';
import { TextElement } from '../Text/TextElement';
import { pipElementTemplate } from './PipElementTemplate';
import { pipElementCosmopolitanStyle } from './Themes/PipElement.Cosmopolitan';
import { pipElementJoyStyle } from './Themes/PipElement.Joy';
import { pipElementMemphisStyle } from './Themes/PipElement.Memphis';
// #endregion
/**
 * Pip - A compact, round visual indicator that displays a single digit, letter, symbol, or icon.
 *
 * @description
 * The Pip component renders a small, circular badge-like element that can contain a text character
 * (digit, letter, symbol) or an icon. It is designed as a generic, reusable indicator for use in
 * listings, timelines, steppers, and other components that need a visual marker for items.
 * Unlike specialized markers, Pip contains no numbering or enumeration logic - it simply renders
 * the content it is given.
 *
 * @name Pip
 * @element mosaik-pip
 * @category Primitives
 *
 * @csspart icon - The icon rendered inside the pip when `icon` is set
 * @csspart label - The text content rendered inside the pip
 *
 * @cssprop {Color} --pip-background-color - The background color of the pip
 * @cssprop {String} --pip-border-color - The border color of the pip
 * @cssprop {String} --pip-border-radius - The border radius CSS custom property.
 * @cssprop {String} --pip-border-style - The border style of the pip
 * @cssprop {String} --pip-border-width - The border width of the pip
 * @cssprop {String} --pip-font-family - The font family for the pip label
 * @cssprop {String} --pip-font-letter-spacing - The letter spacing for the pip label
 * @cssprop {String} --pip-font-line-height - The line height for the pip label
 * @cssprop {String} --pip-font-size - The font size for the pip label
 * @cssprop {String} --pip-font-text-decoration - The text decoration for the pip label
 * @cssprop {String} --pip-font-text-transform - The text transform for the pip label
 * @cssprop {String} --pip-font-weight - The font weight for the pip label
 * @cssprop {Color} --pip-foreground-color - The text and icon color of the pip
 * @cssprop {String} --pip-gap - The gap inside the pip
 * @cssprop {String} --pip-height - The height and width of the pip
 * @cssprop {String} --pip-padding-bottom - The bottom padding inside the pip
 * @cssprop {String} --pip-padding-left - The left padding inside the pip
 * @cssprop {String} --pip-padding-right - The right padding inside the pip
 * @cssprop {String} --pip-padding-top - The top padding inside the pip
 * @cssprop {String} --pip-shadow - The shadow CSS custom property.
 * @cssprop {String} --pip-shadow-blur - The shadow blur CSS custom property.
 * @cssprop {String} --pip-shadow-color - The shadow color CSS custom property.
 * @cssprop {String} --pip-shadow-offset-x - The shadow offset x CSS custom property.
 * @cssprop {String} --pip-shadow-offset-y - The shadow offset y CSS custom property.
 * @cssprop {String} --pip-shadow-spread - The shadow spread CSS custom property.
 * @cssprop {String} --pip-transition-duration - The transition duration
 * @cssprop {String} --pip-transition-mode - The transition timing function
 * @cssprop {String} --pip-transition-property - The CSS properties to animate during transitions
 * @cssprop {String} --pip-translate - The translate CSS custom property.
 *
 * @dependency mosaik-icon - The Icon element.
 * @dependency mosaik-text - The Text element.
 *
 * @example
 * Text pip with a number:
 * ```html
 * <mosaik-pip text="1"></mosaik-pip>
 * ```
 *
 * @example
 * Text pip with a letter:
 * ```html
 * <mosaik-pip text="A" variant="primary" appearance="solid"></mosaik-pip>
 * ```
 *
 * @example
 * Icon pip (set icon via JavaScript):
 * ```html
 * <mosaik-pip id="iconPip" variant="success"></mosaik-pip>
 * <script>
 *   document.querySelector('#iconPip').icon = 'M12 2L2 7l10 5 10-5-10-5z';
 * </script>
 * ```
 *
 * @example
 * Symbol pip:
 * ```html
 * <mosaik-pip text="✓" appearance="soft" variant="success"></mosaik-pip>
 * ```
 *
 * @public
 */
let PipElement = class PipElement extends Themeable(Appearanceable(Variantable(Sizeable(Disableable(CustomElement))))) {
    // #region Fields
    _text;
    _icon;
    _iconSize;
    // #endregion
    // #region Ctor
    /**
     * @public
     */
    constructor() {
        super();
        this._text = '';
        this._icon = '';
        this._iconSize = null;
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `is` property.
     *
     * @public
     * @static
     * @readonly
     */
    static get is() {
        return 'mosaik-pip';
    }
    /**
     * Gets or sets the text content displayed inside the pip.
     * Can be a digit, letter, or symbol (e.g., `"1"`, `"A"`, `"✓"`).
     * Ignored when `icon` is set.
     * The default value is an empty string.
     *
     * @public
     * @attr
     */
    get text() {
        return this._text;
    }
    set text(value) {
        if (this._text !== value) {
            this._text = value;
            this.requestUpdate('text');
        }
    }
    /**
     * Gets or sets the icon SVG path data displayed inside the pip.
     * When set, the icon takes precedence over `text`.
     * The default value is an empty string (no icon).
     *
     * @public
     */
    get icon() {
        return this._icon;
    }
    set icon(value) {
        if (this._icon !== value) {
            this._icon = value;
            this.requestUpdate('icon');
        }
    }
    /**
     * Gets or sets the size of the icon inside the pip.
     * When `null`, the icon size adapts to the pip's own size.
     * The default value is `null`.
     *
     * @public
     * @attr icon-size
     */
    get iconSize() {
        return this._iconSize;
    }
    set iconSize(value) {
        if (this._iconSize !== value) {
            this._iconSize = value;
            this.requestUpdate('iconSize');
        }
    }
};
__decorate([
    Attribute({
        type: String
    }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], PipElement.prototype, "text", null);
__decorate([
    Property({
        type: String
    }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], PipElement.prototype, "icon", null);
__decorate([
    Attribute({
        type: String
    }),
    __metadata("design:type", Object),
    __metadata("design:paramtypes", [Object])
], PipElement.prototype, "iconSize", null);
PipElement = __decorate([
    Component({
        selector: 'mosaik-pip',
        template: pipElementTemplate,
        themes: {
            joy: pipElementJoyStyle,
            memphis: pipElementMemphisStyle,
            cosmopolitan: pipElementCosmopolitanStyle
        },
        imports: [
            IconElement,
            TextElement
        ]
    }),
    __metadata("design:paramtypes", [])
], PipElement);
export { PipElement };
//# sourceMappingURL=PipElement.js.map