import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
import { _ as __ } from './default-i18n.js';
import './index2.js';
import { o as openWormhole } from './consumer.js';
import { d as defineCustomElement$3 } from './sc-format-number2.js';
import { d as defineCustomElement$2 } from './sc-line-item2.js';

const scLineItemBumpCss = ":host{display:block}";

const ScLineItemBump$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
  constructor() {
    super();
    this.__registerHost();
    this.__attachShadow();
  }
  render() {
    var _a, _b, _c;
    if (!((_a = this === null || this === void 0 ? void 0 : this.order) === null || _a === void 0 ? void 0 : _a.bump_amount)) {
      return h(Host, { style: { display: 'none' } });
    }
    return (h("sc-line-item", null, h("span", { slot: "description" }, this.label || __('Bundle Discount', 'surecart')), h("span", { slot: "price" }, h("sc-format-number", { type: "currency", currency: ((_b = this.order) === null || _b === void 0 ? void 0 : _b.currency) || 'usd', value: (_c = this.order) === null || _c === void 0 ? void 0 : _c.bump_amount }))));
  }
  static get style() { return scLineItemBumpCss; }
}, [1, "sc-line-item-bump", {
    "order": [16],
    "label": [1],
    "loading": [4]
  }]);
openWormhole(ScLineItemBump$1, ['order'], false);
function defineCustomElement$1() {
  if (typeof customElements === "undefined") {
    return;
  }
  const components = ["sc-line-item-bump", "sc-format-number", "sc-line-item"];
  components.forEach(tagName => { switch (tagName) {
    case "sc-line-item-bump":
      if (!customElements.get(tagName)) {
        customElements.define(tagName, ScLineItemBump$1);
      }
      break;
    case "sc-format-number":
      if (!customElements.get(tagName)) {
        defineCustomElement$3();
      }
      break;
    case "sc-line-item":
      if (!customElements.get(tagName)) {
        defineCustomElement$2();
      }
      break;
  } });
}
defineCustomElement$1();

const ScLineItemBump = ScLineItemBump$1;
const defineCustomElement = defineCustomElement$1;

export { ScLineItemBump, defineCustomElement };
