import { html } from 'lit';
import { property } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js';
import { boolean } from '../../internal/boolean.mjs';
import FlowRdfElement from '../../internal/flow-ui-rdf-element.mjs';
import styles from './badge.styles.mjs';

var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};
class FlowUiBadge extends FlowRdfElement {
  constructor() {
    super(...arguments);
    this.variant = "primary";
    this.size = "medium";
    this.pill = false;
    this.pulse = false;
  }
  connectedCallback() {
    super.connectedCallback();
    this.pill = boolean(this.pill, true);
    this.pulse = boolean(this.pulse, true);
  }
  render() {
    return html`
      <slot
        part="base"
        class=${classMap({
      badge: true,
      "badge--primary": this.variant === "primary",
      "badge--secondary": this.variant === "secondary",
      "badge--success": this.variant === "success",
      "badge--neutral": this.variant === "neutral",
      "badge--warning": this.variant === "warning",
      "badge--danger": this.variant === "danger",
      "badge--pill": this.pill,
      "badge--pulse": this.pulse
    })}
        role="status"
      ></slot>
    `;
  }
}
FlowUiBadge.styles = styles;
__decorateClass([
  property({ reflect: true })
], FlowUiBadge.prototype, "variant", 2);
__decorateClass([
  property({ reflect: true })
], FlowUiBadge.prototype, "size", 2);
__decorateClass([
  property({ type: Boolean, reflect: true })
], FlowUiBadge.prototype, "pill", 2);
__decorateClass([
  property({ type: Boolean, reflect: true })
], FlowUiBadge.prototype, "pulse", 2);

export { FlowUiBadge as default };
