import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{o as openWormhole}from"./consumer.js";import{d as defineCustomElement$8}from"./sc-button2.js";import{d as defineCustomElement$7}from"./sc-icon2.js";import{d as defineCustomElement$6}from"./sc-line-item2.js";import{d as defineCustomElement$5}from"./sc-product-line-item2.js";import{d as defineCustomElement$4}from"./sc-product-line-item-note2.js";import{d as defineCustomElement$3}from"./sc-quantity-select2.js";import{d as defineCustomElement$2}from"./sc-skeleton2.js";import{d as defineCustomElement$1}from"./sc-spinner2.js";const scOrderConfirmationLineItemsCss=":host{display:block}.line-items{display:grid;gap:var(--sc-spacing-small)}.line-item{display:grid;gap:var(--sc-spacing-small)}.fee__description{opacity:0.75}",ScOrderConfirmationLineItemsStyle0=scOrderConfirmationLineItemsCss,ScOrderConfirmationLineItems=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.order=void 0,this.loading=void 0}render(){var e,t;return this.loading?h("sc-line-item",null,h("sc-skeleton",{style:{width:"50px",height:"50px","--border-radius":"0"},slot:"image"}),h("sc-skeleton",{slot:"title",style:{width:"120px",display:"inline-block"}}),h("sc-skeleton",{slot:"description",style:{width:"60px",display:"inline-block"}}),h("sc-skeleton",{style:{width:"120px",display:"inline-block"},slot:"price"}),h("sc-skeleton",{style:{width:"60px",display:"inline-block"},slot:"price-description"})):h("div",{class:{"confirmation-summary":!0}},h("div",{class:"line-items",part:"line-items"},null===(t=null===(e=this.order)||void 0===e?void 0:e.line_items)||void 0===t?void 0:t.data.map((e=>{var t,i,s,n,o,l,m,r,d;return h("div",{class:"line-item"},h("sc-product-line-item",{key:e.id,image:null===(i=null===(t=null==e?void 0:e.price)||void 0===t?void 0:t.product)||void 0===i?void 0:i.line_item_image,name:`${null===(n=null===(s=null==e?void 0:e.price)||void 0===s?void 0:s.product)||void 0===n?void 0:n.name}`,price:null===(o=null==e?void 0:e.price)||void 0===o?void 0:o.name,variant:null==e?void 0:e.variant_display_options,editable:!1,removable:!1,quantity:e.quantity,fees:null===(l=null==e?void 0:e.fees)||void 0===l?void 0:l.data,note:null==e?void 0:e.display_note,amount:e.ad_hoc_display_amount?e.ad_hoc_display_amount:e.subtotal_display_amount,scratch:!e.ad_hoc_display_amount&&(null==e?void 0:e.scratch_display_amount),trial:null===(m=null==e?void 0:e.price)||void 0===m?void 0:m.trial_text,interval:`${null===(r=null==e?void 0:e.price)||void 0===r?void 0:r.short_interval_text} ${null===(d=null==e?void 0:e.price)||void 0===d?void 0:d.short_interval_count_text}`,purchasableStatus:null==e?void 0:e.purchasable_status_display,sku:null==e?void 0:e.sku}))}))))}static get style(){return ScOrderConfirmationLineItemsStyle0}},[1,"sc-order-confirmation-line-items",{order:[16],loading:[4]}]);function defineCustomElement(){"undefined"!=typeof customElements&&["sc-order-confirmation-line-items","sc-button","sc-icon","sc-line-item","sc-product-line-item","sc-product-line-item-note","sc-quantity-select","sc-skeleton","sc-spinner"].forEach((e=>{switch(e){case"sc-order-confirmation-line-items":customElements.get(e)||customElements.define(e,ScOrderConfirmationLineItems);break;case"sc-button":customElements.get(e)||defineCustomElement$8();break;case"sc-icon":customElements.get(e)||defineCustomElement$7();break;case"sc-line-item":customElements.get(e)||defineCustomElement$6();break;case"sc-product-line-item":customElements.get(e)||defineCustomElement$5();break;case"sc-product-line-item-note":customElements.get(e)||defineCustomElement$4();break;case"sc-quantity-select":customElements.get(e)||defineCustomElement$3();break;case"sc-skeleton":customElements.get(e)||defineCustomElement$2();break;case"sc-spinner":customElements.get(e)||defineCustomElement$1()}}))}openWormhole(ScOrderConfirmationLineItems,["order","busy","loading","empty"],!1);export{ScOrderConfirmationLineItems as S,defineCustomElement as d};