import { unsafeCSS, LitElement, nothing, html } from "lit";
import { property } from "lit/decorators.js";
import componentStyle from "./tooltip.css.js";
import { classMap } from "lit/directives/class-map.js";
import { customElement } from "../../decorator.js";
import "../../icons/icon-placeholder.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 TooltipType = /* @__PURE__ */ ((TooltipType2) => {
  TooltipType2["icon"] = "icon";
  TooltipType2["label"] = "label";
  return TooltipType2;
})(TooltipType || {});
var TooltipVariant = /* @__PURE__ */ ((TooltipVariant2) => {
  TooltipVariant2["normal"] = "normal";
  TooltipVariant2["raised"] = "raised";
  TooltipVariant2["enhanced"] = "enhanced";
  TooltipVariant2["eco"] = "eco";
  TooltipVariant2["alarm"] = "alarm";
  TooltipVariant2["warning"] = "warning";
  TooltipVariant2["caution"] = "caution";
  return TooltipVariant2;
})(TooltipVariant || {});
let ObcTooltip = class extends LitElement {
  constructor() {
    super(...arguments);
    this.type = "label";
    this.variant = "normal";
    this.label = "Label";
    this.showIcon = false;
  }
  render() {
    const showIconSlot = this.type === "icon" || this.type === "label" && this.showIcon;
    return html`
      <div
        class=${classMap({
      wrapper: true,
      [this.type]: true,
      [this.variant]: true
    })}
      >
        ${showIconSlot ? html`
              <div class="icon-container">
                <slot name="icon">
                  <obi-placeholder></obi-placeholder>
                </slot>
              </div>
            ` : nothing}
        ${this.type === "label" ? html`
              <div class="label-container">
                <span class="label-text">${this.label}</span>
              </div>
            ` : nothing}

        <div class="bottom-arrow">
          <svg width="10" height="6" viewBox="0 0 10 6" fill="none">
            <path d="M5 6L0 0H10L5 6Z" fill="currentColor" />
          </svg>
        </div>
      </div>
    `;
  }
};
ObcTooltip.styles = unsafeCSS(componentStyle);
__decorateClass([
  property({ type: String })
], ObcTooltip.prototype, "type", 2);
__decorateClass([
  property({ type: String })
], ObcTooltip.prototype, "variant", 2);
__decorateClass([
  property({ type: String })
], ObcTooltip.prototype, "label", 2);
__decorateClass([
  property({ type: Boolean })
], ObcTooltip.prototype, "showIcon", 2);
ObcTooltip = __decorateClass([
  customElement("obc-tooltip")
], ObcTooltip);
export {
  ObcTooltip,
  TooltipType,
  TooltipVariant
};
//# sourceMappingURL=tooltip.js.map
