import { unsafeCSS, LitElement, html } from "lit";
import { property } from "lit/decorators.js";
import { customElement } from "../../decorator.js";
import { classMap } from "lit/directives/class-map.js";
import componentStyle from "./tag.css.js";
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;
};
var TagColor = /* @__PURE__ */ ((TagColor2) => {
  TagColor2["gray"] = "gray";
  TagColor2["blue"] = "blue";
  TagColor2["cyan"] = "cyan";
  TagColor2["teal"] = "teal";
  TagColor2["green"] = "green";
  TagColor2["yellow"] = "yellow";
  TagColor2["orange"] = "orange";
  TagColor2["red"] = "red";
  TagColor2["purple"] = "purple";
  TagColor2["indigo"] = "indigo";
  return TagColor2;
})(TagColor || {});
let ObcTag = class extends LitElement {
  constructor() {
    super(...arguments);
    this.label = "Label";
    this.color = "gray";
    this.hasIcon = false;
  }
  renderLeadingIcon() {
    if (this.hasIcon) {
      return html`
        <div class="tag-icon-wrapper">
          <slot></slot>
        </div>
      `;
    }
    return html``;
  }
  render() {
    return html`
      <div
        class=${classMap({
      wrapper: true,
      ["color-" + this.color]: true
    })}
      >
        ${this.renderLeadingIcon()}
        <div class="tag-label-container">
          <span class="tag-label">${this.label}</span>
        </div>
      </div>
    `;
  }
};
ObcTag.styles = unsafeCSS(componentStyle);
__decorateClass([
  property({ type: String })
], ObcTag.prototype, "label", 2);
__decorateClass([
  property({ type: String })
], ObcTag.prototype, "color", 2);
__decorateClass([
  property({ type: Boolean })
], ObcTag.prototype, "hasIcon", 2);
ObcTag = __decorateClass([
  customElement("obc-tag")
], ObcTag);
export {
  ObcTag,
  TagColor
};
//# sourceMappingURL=tag.js.map
