import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
import { d as defineCustomElement$2 } from './klevu-typography2.js';

const klevuBadgeCss = ":host{display:inline-block;padding:var(--klevu-spacing-02) var(--klevu-spacing-05);background:var(--klevu-badge-background);border-radius:var(--klevu-border-radius-xxl, var(--klevu-badge-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$1 = /*@__PURE__*/ proxyCustomElement(class KlevuBadge extends HTMLElement {
  constructor() {
    super();
    this.__registerHost();
    this.__attachShadow();
    this.klevuBadgeClose = createEvent(this, "klevuBadgeClose", 7);
    this.accent = undefined;
    this.neutral = undefined;
  }
  render() {
    let style = {};
    if (this.accent || this.neutral) {
      style = {
        "--klevu-badge-background": this.accent
          ? `var(--klevu-color-accent-${this.accent})`
          : `var(--klevu-color-neutral-${this.neutral})`,
      };
    }
    return (h(Host, { style: style }, h("klevu-typography", { variant: "body-xs" }, h("slot", null))));
  }
  static get style() { return klevuBadgeCss; }
}, [1, "klevu-badge", {
    "accent": [2],
    "neutral": [2]
  }]);
function defineCustomElement$1() {
  if (typeof customElements === "undefined") {
    return;
  }
  const components = ["klevu-badge", "klevu-typography"];
  components.forEach(tagName => { switch (tagName) {
    case "klevu-badge":
      if (!customElements.get(tagName)) {
        customElements.define(tagName, KlevuBadge$1);
      }
      break;
    case "klevu-typography":
      if (!customElements.get(tagName)) {
        defineCustomElement$2();
      }
      break;
  } });
}
defineCustomElement$1();

const KlevuBadge = KlevuBadge$1;
const defineCustomElement = defineCustomElement$1;

export { KlevuBadge, defineCustomElement };

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