import { Component, h, Prop } from '@stencil/core';
import { __ } from '@wordpress/i18n';
import { openWormhole } from 'stencil-wormhole';
export class ScOrderBumps {
  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 is() { return "sc-order-bumps"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["sc-order-bumps.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["sc-order-bumps.css"]
  }; }
  static get properties() { return {
    "label": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "label",
      "reflect": false
    },
    "showControl": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "show-control",
      "reflect": false
    },
    "help": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "help",
      "reflect": false
    },
    "bumps": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "Bump[]",
        "resolved": "Bump[]",
        "references": {
          "Bump": {
            "location": "import",
            "path": "../../../../types"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      }
    },
    "checkout": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "Checkout",
        "resolved": "Checkout",
        "references": {
          "Checkout": {
            "location": "import",
            "path": "../../../../types"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      }
    }
  }; }
}
openWormhole(ScOrderBumps, ['bumps', 'checkout'], false);
