/**
 * @license
 * Copyright Tyler Technologies, Inc. 
 * License: Apache-2.0
 */
import { __decorate } from "tslib";
import { attachShadowTemplate, CustomElement } from '@tylertech/forge-core';
import { BaseComponent } from '../core/base/base-component';
import { BADGE_CONSTANTS } from './badge-constants';
const template = '<template><div class=\"forge-badge\" part=\"root\"><slot name=\"start\"></slot><slot></slot><slot name=\"end\"></slot></div></template>';
const styles = ':host{display:-webkit-box;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box}:host([hidden]){display:none}.forge-badge{--_badge-background:var(--forge-badge-background, var(--forge-theme-secondary, #ffc107));--_badge-color:var(--forge-badge-color, var(--forge-theme-on-secondary, #000000));--_badge-shape:var(--forge-badge-shape, var(--forge-shape-full, 9999px));--_badge-height:var(--forge-badge-height, 20px);--_badge-min-width:var(--forge-badge-min-width, 0);--_badge-max-width:var(--forge-badge-max-width, auto);--_badge-padding-inline:var(--forge-badge-padding-inline, var(--forge-spacing-xsmall, 8px));--_badge-padding-block:var(--forge-badge-padding-block, 0);--_badge-border-width:var(--forge-badge-border-width, var(--forge-border-thin, 1px));--_badge-border-style:var(--forge-badge-border-style, none);--_badge-border-color:var(--forge-badge-border-color, var(--_badge-color));--_badge-gap:var(--forge-badge-gap, var(--forge-spacing-xsmall, 8px));--_badge-font-weight:var(--forge-badge-font-weight, bold);--_badge-dot-size:var(--forge-badge-dot-size, 8px);--_badge-dot-height:var(--forge-badge-dot-height, var(--_badge-dot-size));--_badge-dot-width:var(--forge-badge-dot-width, var(--_badge-dot-size));--_badge-dot-padding:var(--forge-badge-dot-padding, 0);--_badge-transition-duration:var(--forge-badge-transition-duration, var(--forge-animation-duration-short4, 200ms));--_badge-transition-easing:var(--forge-badge-transition-easing, var(--forge-animation-easing-decelerate, cubic-bezier(0, 0, 0, 1)))}.forge-badge{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, \"Roboto\", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-label1-text-decoration,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);background:var(--_badge-background);color:var(--_badge-color);height:var(--_badge-height);min-width:var(--_badge-min-width);max-width:var(--_badge-max-width);border-width:var(--_badge-border-width);border-style:var(--_badge-border-style);border-color:var(--_badge-border-color);display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;gap:var(--_badge-gap);border-radius:var(--_badge-shape);padding-inline:var(--_badge-padding-inline);padding-block:var(--_badge-padding-block);overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;pointer-events:none;-webkit-transition:-webkit-transform var(--_badge-transition-duration) var(--_badge-transition-easing);transition:-webkit-transform var(--_badge-transition-duration) var(--_badge-transition-easing);transition:transform var(--_badge-transition-duration) var(--_badge-transition-easing);transition:transform var(--_badge-transition-duration) var(--_badge-transition-easing),-webkit-transform var(--_badge-transition-duration) var(--_badge-transition-easing);font-weight:var(--_badge-font-weight);text-overflow:ellipsis;white-space:nowrap}::slotted(:is([slot=start],[slot=end])){font-size:inherit}:host([hide]) .forge-badge{-webkit-transform:scale(0);transform:scale(0)}:host([dot]) .forge-badge{--_badge-height:var(--_badge-dot-height);--_badge-min-width:var(--forge-badge-min-width, auto);padding:var(--_badge-dot-padding);width:var(--_badge-dot-width)}:host([dot]) .forge-badge>slot{display:none}:host([theme=primary]) .forge-badge{--_badge-background:var(--forge-badge-background, var(--forge-theme-primary-container, #d1d5ed));--_badge-color:var(--forge-badge-color, var(--forge-theme-on-primary-container, #222c62))}:host([strong][theme=primary]) .forge-badge{--_badge-background:var(--forge-badge-background, var(--forge-theme-primary, #3f51b5));--_badge-color:var(--forge-badge-color, var(--forge-theme-on-primary, #ffffff))}:host([theme=secondary]) .forge-badge{--_badge-background:var(--forge-badge-background, var(--forge-theme-secondary-container, #fff0c3));--_badge-color:var(--forge-badge-color, var(--forge-theme-on-secondary-container, #8a6804))}:host([strong][theme=secondary]) .forge-badge{--_badge-background:var(--forge-badge-background, var(--forge-theme-secondary, #ffc107));--_badge-color:var(--forge-badge-color, var(--forge-theme-on-secondary, #000000))}:host([theme=tertiary]) .forge-badge{--_badge-background:var(--forge-badge-background, var(--forge-theme-tertiary-container, #d0d7ff));--_badge-color:var(--forge-badge-color, var(--forge-theme-on-tertiary-container, #213189))}:host([strong][theme=tertiary]) .forge-badge{--_badge-background:var(--forge-badge-background, var(--forge-theme-tertiary, #3d5afe));--_badge-color:var(--forge-badge-color, var(--forge-theme-on-tertiary, #ffffff))}:host([theme=success]) .forge-badge{--_badge-background:var(--forge-badge-background, var(--forge-theme-success-container, #cde0ce));--_badge-color:var(--forge-badge-color, var(--forge-theme-on-success-container, #19441b))}:host([strong][theme=success]) .forge-badge{--_badge-background:var(--forge-badge-background, var(--forge-theme-success, #2e7d32));--_badge-color:var(--forge-badge-color, var(--forge-theme-on-success, #ffffff))}:host([theme=warning]) .forge-badge{--_badge-background:var(--forge-badge-background, var(--forge-theme-warning-container, #f4d3c2));--_badge-color:var(--forge-badge-color, var(--forge-theme-on-warning-container, #712700))}:host([strong][theme=warning]) .forge-badge{--_badge-background:var(--forge-badge-background, var(--forge-theme-warning, #d14900));--_badge-color:var(--forge-badge-color, var(--forge-theme-on-warning, #ffffff))}:host(:not([strong]):is([theme=error],[theme=danger])) .forge-badge{--_badge-background:var(--forge-badge-background, var(--forge-theme-error-container, #ecc2c9));--_badge-color:var(--forge-badge-color, var(--forge-theme-error, #b00020))}:host([strong]:is([theme=error],[theme=danger])) .forge-badge{--_badge-background:var(--forge-badge-background, var(--forge-theme-error, #b00020));--_badge-color:var(--forge-badge-color, var(--forge-theme-on-error, #ffffff))}:host(:not([strong]):is([theme=info],[theme=info-primary])) .forge-badge{--_badge-background:var(--forge-badge-background, var(--forge-theme-info-container, #c7daf0));--_badge-color:var(--forge-badge-color, var(--forge-theme-on-info-container, #0b3768))}:host([strong]:is([theme=info],[theme=info-primary])) .forge-badge{--_badge-background:var(--forge-badge-background, var(--forge-theme-info, #1565c0));--_badge-color:var(--forge-badge-color, var(--forge-theme-on-info, #ffffff))}:host(:not([strong])[theme=info-secondary]) .forge-badge{--_badge-background:var(--forge-badge-background, var(--forge-theme-surface-container-low, #ebebeb));--_badge-color:var(--forge-badge-color, var(--forge-theme-on-surface-container-low, #000000))}:host([strong][theme=info-secondary]) .forge-badge{--_badge-background:var(--forge-badge-background, var(--forge-theme-surface-inverse, #333333));--_badge-color:var(--forge-badge-color, var(--forge-theme-on-surface-inverse, #ffffff))}';
/**
 * @tag forge-badge
 *
 * @summary Badges are non-interactive components used to inform status, counts, or as a descriptive label.
 *
 * @property {boolean} dot - Controls whether the badge will be a small dot without any content visible.
 * @property {BadgeTheme} theme - The theme of the badge.
 * @property {boolean} strong - Controls whether the badge will have a stronger visual appearance.
 * @property {boolean} hide - Controls whether the badge is visible.
 *
 * @attribute {boolean} dot - When present, the badge will be a small dot without any content visible.
 * @attribute {BadgeTheme} theme - The theme of the badge.
 * @attribute {boolean} strong - Controls whether the badge will have a stronger visual appearance.
 * @attribute {boolean} hide - Controls whether the badge is visible.
 *
 * @cssproperty --forge-badge-background - The background color.
 * @cssproperty --forge-badge-color - The text color.
 * @cssproperty --forge-badge-shape - The shape radius.
 * @cssproperty --forge-badge-padding-inline - The inline padding.
 * @cssproperty --forge-badge-padding-block - The block padding.
 * @cssproperty --forge-badge-border-width - The border width.
 * @cssproperty --forge-badge-border-color - The border color.
 * @cssproperty --forge-badge-border-style - The border style.
 * @cssproperty --forge-badge-gap - The spacing between the content within the badge.
 *
 * @slot - Default content placed inside the badge.
 * @slot start - Content placed before the default content.
 * @slot end - Content placed after the default content.
 */
let BadgeComponent = class BadgeComponent extends BaseComponent {
    constructor() {
        super();
        attachShadowTemplate(this, template, styles);
    }
    get dot() {
        return this.hasAttribute(BADGE_CONSTANTS.attributes.DOT);
    }
    set dot(value) {
        this.toggleAttribute(BADGE_CONSTANTS.attributes.DOT, value);
    }
    get theme() {
        var _a;
        return (_a = this.getAttribute(BADGE_CONSTANTS.attributes.THEME)) !== null && _a !== void 0 ? _a : BADGE_CONSTANTS.defaults.THEME;
    }
    set theme(value) {
        this.setAttribute(BADGE_CONSTANTS.attributes.THEME, value);
    }
    get strong() {
        return this.hasAttribute(BADGE_CONSTANTS.attributes.STRONG);
    }
    set strong(value) {
        this.toggleAttribute(BADGE_CONSTANTS.attributes.STRONG, value);
    }
    get hide() {
        return this.hasAttribute(BADGE_CONSTANTS.attributes.HIDE);
    }
    set hide(value) {
        if (this.hasAttribute(BADGE_CONSTANTS.attributes.HIDE) !== value) {
            this.toggleAttribute(BADGE_CONSTANTS.attributes.HIDE, value);
        }
    }
};
BadgeComponent = __decorate([
    CustomElement({
        name: BADGE_CONSTANTS.elementName
    })
], BadgeComponent);
export { BadgeComponent };
