import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{f as formBusy}from"./getters3.js";import{s as state}from"./mutations2.js";import{d as defineCustomElement$3}from"./sc-icon2.js";import{d as defineCustomElement$2}from"./sc-line-item2.js";import{d as defineCustomElement$1}from"./sc-skeleton2.js";const scLineItemInvoiceReceiptDownloadCss=":host{display:block}sc-line-item{text-align:left;line-height:var(--sc-line-height-dense);color:var(--sc-input-label-color)}.sc-invoice-download-link{display:inline-flex;gap:var(--sc-spacing-x-small);text-decoration:none;color:inherit}",ScLineItemInvoiceReceiptDownloadStyle0=scLineItemInvoiceReceiptDownloadCss,ScLineItemInvoiceReceiptDownload=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.checkout=void 0}render(){var e;const t=null==state?void 0:state.checkout,n=(null===(e=null==t?void 0:t.invoice)||void 0===e?void 0:e.id)?null==t?void 0:t.pdf_url:null;return n?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"},wp.i18n.__("Receipt / Invoice","surecart"))),h("span",{slot:"price-description"},h("a",{class:"sc-invoice-download-link",href:n,target:"_blank",rel:"noopener noreferrer"},h("sc-icon",{name:"download"}),wp.i18n.__("Download","surecart")))):null}static get style(){return ScLineItemInvoiceReceiptDownloadStyle0}},[1,"sc-line-item-invoice-receipt-download",{checkout:[16]}]);function defineCustomElement(){"undefined"!=typeof customElements&&["sc-line-item-invoice-receipt-download","sc-icon","sc-line-item","sc-skeleton"].forEach((e=>{switch(e){case"sc-line-item-invoice-receipt-download":customElements.get(e)||customElements.define(e,ScLineItemInvoiceReceiptDownload);break;case"sc-icon":customElements.get(e)||defineCustomElement$3();break;case"sc-line-item":customElements.get(e)||defineCustomElement$2();break;case"sc-skeleton":customElements.get(e)||defineCustomElement$1()}}))}export{ScLineItemInvoiceReceiptDownload as S,defineCustomElement as d};