import{h}from"@stencil/core";import{__}from"@wordpress/i18n";import{formBusy}from"../../../../store/form/getters";import{state as checkoutState}from"../../../../store/checkout/index";export class ScLineItemInvoiceReceiptDownload{constructor(){this.checkout=void 0}render(){var e;const t=null==checkoutState?void 0:checkoutState.checkout,o=(null===(e=null==t?void 0:t.invoice)||void 0===e?void 0:e.id)?null==t?void 0:t.pdf_url:null;return o?formBusy()&&!(null==t?void 0:t.invoice)?h("sc-line-item",null,h("sc-skeleton",{slot:"title",style:{width:"120px",display:"inline-block"}}),h("sc-skeleton",{slot:"price",style:{width:"50px",display:"inline-block","--border-radius":"6px"}})):h("sc-line-item",null,h("span",{slot:"description"},h("slot",{name:"title"},__("Receipt / Invoice","surecart"))),h("span",{slot:"price-description"},h("a",{class:"sc-invoice-download-link",href:o,target:"_blank",rel:"noopener noreferrer"},h("sc-icon",{name:"download"}),__("Download","surecart")))):null}static get is(){return"sc-line-item-invoice-receipt-download"}static get encapsulation(){return"shadow"}static get originalStyleUrls(){return{$:["sc-line-item-invoice-receipt-download.scss"]}}static get styleUrls(){return{$:["sc-line-item-invoice-receipt-download.css"]}}static get properties(){return{checkout:{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:""}}}}}