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;
};
import { UmbTextStyles } from '../../style/index.js';
import { html, customElement, property, css, LitElement, ifDefined } from '../../../../external/lit/index.js';
/**
 * @element umb-badge
 * @description A wrapper for the uui-badge component with position fixed support to go on top of other elements.
 * @augments {LitElement}
 */
let UmbBadgeElement = class UmbBadgeElement extends LitElement {
    render() {
        return html `<uui-badge color=${ifDefined(this.color)} look=${ifDefined(this.look)} ?attention=${this.attention}
			><slot></slot
		></uui-badge>`;
    }
    static { this.styles = [
        UmbTextStyles,
        css `
			:host {
				position: absolute;
				/** because inset has no effect on uui-badge in this case, we then apply it here: */
				inset: var(--uui-badge-inset, -8px -8px auto auto);
			}

			:host([inline-mode]) {
				position: relative;
				margin-left: 12px;
			}

			@supports (position-anchor: --my-name) {
				:host(:not([inline-mode])) {
					anchor-name: --umb-badge-anchor;
				}
				:host(:not([inline-mode])) uui-badge {
					position: fixed;
					position-anchor: --umb-badge-anchor;
					z-index: 1;
					top: anchor(top);
					right: anchor(right);
				}
			}
		`,
    ]; }
};
__decorate([
    property({ type: String })
], UmbBadgeElement.prototype, "color", void 0);
__decorate([
    property({ type: String })
], UmbBadgeElement.prototype, "look", void 0);
__decorate([
    property({ type: Boolean })
], UmbBadgeElement.prototype, "attention", void 0);
UmbBadgeElement = __decorate([
    customElement('umb-badge')
], UmbBadgeElement);
export { UmbBadgeElement };
