import{h}from"@stencil/core";import{__}from"@wordpress/i18n";import{state as checkoutState}from"../../../../store/checkout/index";export class ScOrderBumps{constructor(){this.label=void 0,this.showControl=void 0,this.help=void 0}render(){var e,t;const r=((null===(t=null===(e=null==checkoutState?void 0:checkoutState.checkout)||void 0===e?void 0:e.recommended_bumps)||void 0===t?void 0:t.data)||[]).filter((e=>{var t,r,o,l;return 0===(null===(l=null===(o=null===(r=null===(t=null==e?void 0:e.price)||void 0===t?void 0:t.product)||void 0===r?void 0:r.variants)||void 0===o?void 0:o.pagination)||void 0===l?void 0:l.count)}));return(null==r?void 0:r.length)?h("sc-form-control",{label:this.label||__("Recommended","surecart"),help:this.help},h("div",{class:"bumps__list","aria-label":__("Order bump summary","surecart")},r.map((e=>h("sc-order-bump",{key:null==e?void 0:e.id,showControl:this.showControl,bump:e}))))):null}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:!1,complexType:{original:"string",resolved:"string",references:{}},required:!1,optional:!1,docs:{tags:[],text:""},attribute:"label",reflect:!1},showControl:{type:"boolean",mutable:!1,complexType:{original:"boolean",resolved:"boolean",references:{}},required:!1,optional:!1,docs:{tags:[],text:""},attribute:"show-control",reflect:!1},help:{type:"string",mutable:!1,complexType:{original:"string",resolved:"string",references:{}},required:!1,optional:!1,docs:{tags:[],text:""},attribute:"help",reflect:!1}}}}