'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-85d13173.js');

const klevuBadgeCss = ":host{--background:var(--klevu-badge-background, var(--klevu-color-accent-1));--border-radius:var(--klevu-badge-border-radius, var(--klevu-border-radius-xxl));display:inline-block}div{display:inline-block;padding:var(--klevu-spacing-02) var(--klevu-spacing-05);background:var(--background);border-radius:var(--border-radius);align-items:center}klevu-icon{position:relative;top:1px;left:-4px;font-size:0.7em;margin-right:var(--klevu-spacing-01)}klevu-typography{line-height:1}";

const KlevuBadge = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.accent = undefined;
    this.neutral = undefined;
  }
  render() {
    let style = {};
    if (this.accent || this.neutral) {
      style = {
        "--background": this.accent
          ? `var(--klevu-color-accent-${this.accent})`
          : `var(--klevu-color-neutral-${this.neutral})`,
        "--klevu-typography-color": this.neutral && this.neutral > 6 ? "var(--klevu-color-neutral-1)" : "var(--klevu-typography-color)",
      };
    }
    return (index.h("div", { style: style, part: "badge-base" }, index.h("klevu-typography", { variant: "body-xs" }, index.h("span", { part: "badge-content" }, index.h("slot", null)))));
  }
};
KlevuBadge.style = klevuBadgeCss;

exports.klevu_badge = KlevuBadge;

//# sourceMappingURL=klevu-badge.cjs.entry.js.map