import{h}from"@stencil/core";import{openWormhole}from"stencil-wormhole";export class ScOrderConfirmationLineItems{constructor(){this.order=void 0,this.loading=void 0}render(){var i,e;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===(e=null===(i=this.order)||void 0===i?void 0:i.line_items)||void 0===e?void 0:e.data.map((i=>{var e,t,o,l,n,s,r,a,d;return h("div",{class:"line-item"},h("sc-product-line-item",{key:i.id,image:null===(t=null===(e=null==i?void 0:i.price)||void 0===e?void 0:e.product)||void 0===t?void 0:t.line_item_image,name:`${null===(l=null===(o=null==i?void 0:i.price)||void 0===o?void 0:o.product)||void 0===l?void 0:l.name}`,price:null===(n=null==i?void 0:i.price)||void 0===n?void 0:n.name,variant:null==i?void 0:i.variant_display_options,editable:!1,removable:!1,quantity:i.quantity,fees:null===(s=null==i?void 0:i.fees)||void 0===s?void 0:s.data,note:null==i?void 0:i.display_note,amount:i.ad_hoc_display_amount?i.ad_hoc_display_amount:i.subtotal_display_amount,scratch:!i.ad_hoc_display_amount&&(null==i?void 0:i.scratch_display_amount),trial:null===(r=null==i?void 0:i.price)||void 0===r?void 0:r.trial_text,interval:`${null===(a=null==i?void 0:i.price)||void 0===a?void 0:a.short_interval_text} ${null===(d=null==i?void 0:i.price)||void 0===d?void 0:d.short_interval_count_text}`,purchasableStatus:null==i?void 0:i.purchasable_status_display,sku:null==i?void 0:i.sku}))}))))}static get is(){return"sc-order-confirmation-line-items"}static get encapsulation(){return"shadow"}static get originalStyleUrls(){return{$:["sc-order-confirmation-line-items.scss"]}}static get styleUrls(){return{$:["sc-order-confirmation-line-items.css"]}}static get properties(){return{order:{type:"unknown",mutable:!1,complexType:{original:"Checkout",resolved:"Checkout",references:{Checkout:{location:"import",path:"../../../../types",id:"src/types.ts::Checkout"}}},required:!1,optional:!1,docs:{tags:[],text:""}},loading:{type:"boolean",mutable:!1,complexType:{original:"boolean",resolved:"boolean",references:{}},required:!1,optional:!1,docs:{tags:[],text:""},attribute:"loading",reflect:!1}}}}openWormhole(ScOrderConfirmationLineItems,["order","busy","loading","empty"],!1);