import { proxyCustomElement, HTMLElement, h } 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$6 } from './sc-choice2.js';
import { d as defineCustomElement$5 } from './sc-divider2.js';
import { d as defineCustomElement$4 } from './sc-form-control2.js';
import { d as defineCustomElement$3 } from './sc-format-number2.js';
import { d as defineCustomElement$2 } from './sc-order-bump2.js';
import { d as defineCustomElement$1 } from './sc-tooltip2.js';

const scOrderBumpsCss = ":host{display:block}.bumps__list{display:grid;gap:10px}";

const ScOrderBumps = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
  constructor() {
    super();
    this.__registerHost();
    this.__attachShadow();
  }
  render() {
    var _a;
    if (!((_a = this === null || this === void 0 ? void 0 : this.bumps) === null || _a === void 0 ? void 0 : _a.length)) {
      return null;
    }
    return (h("sc-form-control", { label: this.label || __('Recommended', 'surecart'), help: this.help }, h("div", { class: "bumps__list" }, (this.bumps || []).map(bump => (h("sc-order-bump", { key: bump === null || bump === void 0 ? void 0 : bump.id, showControl: this.showControl, bump: bump, checkout: this.checkout }))))));
  }
  static get style() { return scOrderBumpsCss; }
}, [1, "sc-order-bumps", {
    "label": [1],
    "showControl": [4, "show-control"],
    "help": [1],
    "bumps": [16],
    "checkout": [16]
  }]);
openWormhole(ScOrderBumps, ['bumps', 'checkout'], false);
function defineCustomElement() {
  if (typeof customElements === "undefined") {
    return;
  }
  const components = ["sc-order-bumps", "sc-choice", "sc-divider", "sc-form-control", "sc-format-number", "sc-order-bump", "sc-tooltip"];
  components.forEach(tagName => { switch (tagName) {
    case "sc-order-bumps":
      if (!customElements.get(tagName)) {
        customElements.define(tagName, ScOrderBumps);
      }
      break;
    case "sc-choice":
      if (!customElements.get(tagName)) {
        defineCustomElement$6();
      }
      break;
    case "sc-divider":
      if (!customElements.get(tagName)) {
        defineCustomElement$5();
      }
      break;
    case "sc-form-control":
      if (!customElements.get(tagName)) {
        defineCustomElement$4();
      }
      break;
    case "sc-format-number":
      if (!customElements.get(tagName)) {
        defineCustomElement$3();
      }
      break;
    case "sc-order-bump":
      if (!customElements.get(tagName)) {
        defineCustomElement$2();
      }
      break;
    case "sc-tooltip":
      if (!customElements.get(tagName)) {
        defineCustomElement$1();
      }
      break;
  } });
}
defineCustomElement();

export { ScOrderBumps as S, defineCustomElement as d };
