import { property } from "lit/decorators.js";
import { unsafeStatic, html } from "lit/static-html.js";
import { LitElement, nothing } from "lit";
import { iconIds } from "./names.js";
import { customElement } from "../decorator.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;
};
let ObiIcon = class extends LitElement {
  constructor() {
    super(...arguments);
    this.useCssColor = false;
  }
  render() {
    if (!this.icon) {
      return nothing;
    }
    if (iconIds[this.icon]) {
      const tag = unsafeStatic(`obi-${this.icon}`);
      return html`<${tag} ?useCssColor=${this.useCssColor}></${tag}>`;
    }
    return nothing;
  }
};
__decorateClass([
  property({ type: String })
], ObiIcon.prototype, "icon", 2);
__decorateClass([
  property({ type: Boolean })
], ObiIcon.prototype, "useCssColor", 2);
ObiIcon = __decorateClass([
  customElement("obi-icon")
], ObiIcon);
export {
  ObiIcon
};
//# sourceMappingURL=icon.js.map
