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