import{h}from"@stencil/core";import{sprintf,__}from"@wordpress/i18n";import{openWormhole}from"stencil-wormhole";export class ScOrderConfirmationDetails{constructor(){this.order=void 0,this.loading=void 0}renderOrderStatus(){var e,t;return"processing"===(null===(e=null==this?void 0:this.order)||void 0===e?void 0:e.status)?h("sc-tag",{type:"warning"},__("On Hold","surecart")):h("sc-order-status-badge",{status:null===(t=this.order)||void 0===t?void 0:t.status})}render(){var e,t;return this.loading?h("sc-dashboard-module",null,h("sc-skeleton",{slot:"heading",style:{width:"120px",display:"inline-block"}}),h("sc-skeleton",{slot:"end",style:{width:"60px",display:"inline-block"}}),h("sc-card",null,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("sc-divider",null),h("sc-line-item",null,h("sc-skeleton",{slot:"title",style:{width:"120px",display:"inline-block"}}),h("sc-skeleton",{style:{width:"120px",display:"inline-block"},slot:"price"})),h("sc-divider",null),h("sc-line-item",null,h("sc-skeleton",{slot:"title",style:{width:"120px",display:"inline-block"}}),h("sc-skeleton",{style:{width:"120px",display:"inline-block"},slot:"price"})))):(null===(e=this.order)||void 0===e?void 0:e.number)?h("sc-dashboard-module",{class:"order"},h("span",{slot:"heading"},sprintf(__("Order #%s","surecart"),null===(t=this.order)||void 0===t?void 0:t.number)),h("span",{slot:"end"},this.renderOrderStatus()),h("sc-card",null,h("sc-order-confirmation-line-items",null),h("sc-order-confirmation-totals",null))):void 0}static get is(){return"sc-order-confirmation-details"}static get encapsulation(){return"shadow"}static get originalStyleUrls(){return{$:["sc-order-confirmation-details.css"]}}static get styleUrls(){return{$:["sc-order-confirmation-details.css"]}}static get properties(){return{order:{type:"unknown",mutable:!1,complexType:{original:"Order",resolved:"Order",references:{Order:{location:"import",path:"../../../../types",id:"src/types.ts::Order"}}},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(ScOrderConfirmationDetails,["order","loading"],!1);