import { r as registerInstance, h } from './index-e582ed08.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) {
    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 (h("div", { style: style, part: "badge-base" }, h("klevu-typography", { variant: "body-xs" }, h("span", { part: "badge-content" }, h("slot", null)))));
  }
};
KlevuBadge.style = klevuBadgeCss;

export { KlevuBadge as klevu_badge };

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