FileMaster
Search
Toggle Dark Mode
Home
/
.
/
wp-content
/
plugins
/
surecart
/
dist
/
components
/
components
Edit File: sc-line-item-tax2.js
import{proxyCustomElement,HTMLElement,h,Fragment}from"@stencil/core/internal/client";import{o as openWormhole}from"./consumer.js";import{d as defineCustomElement$1}from"./sc-line-item2.js";const scLineItemTaxCss=":host{display:block}",ScLineItemTaxStyle0=scLineItemTaxCss,ScLineItemTax=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.order=void 0,this.loading=void 0}renderLabel(){var e,t,i;let n=wp.i18n.sprintf(wp.i18n.__("Estimated %s","surecart"),(null===(e=null==this?void 0:this.order)||void 0===e?void 0:e.tax_label)||"");return"calculated"===(null===(t=null==this?void 0:this.order)||void 0===t?void 0:t.tax_status)&&(n=(null===(i=this.order)||void 0===i?void 0:i.tax_label)||""),h(Fragment,null,`${wp.i18n.__("Tax","surecart")} ${n}`)}render(){var e,t,i,n,s;return(null===(e=null==this?void 0:this.order)||void 0===e?void 0:e.tax_amount)?h("sc-line-item",null,h("span",{slot:"description"},this.renderLabel()),(null===(t=this.order)||void 0===t?void 0:t.tax_exclusive_amount)&&h("span",{slot:"price"},null===(i=this.order)||void 0===i?void 0:i.tax_exclusive_display_amount),(null===(n=this.order)||void 0===n?void 0:n.tax_inclusive_amount)&&h("span",{slot:"price-description"},"(",null===(s=this.order)||void 0===s?void 0:s.tax_inclusive_display_amount," ",wp.i18n.__("included","surecart"),")")):null}static get style(){return ScLineItemTaxStyle0}},[1,"sc-line-item-tax",{order:[16],loading:[4]}]);function defineCustomElement(){"undefined"!=typeof customElements&&["sc-line-item-tax","sc-line-item"].forEach((e=>{switch(e){case"sc-line-item-tax":customElements.get(e)||customElements.define(e,ScLineItemTax);break;case"sc-line-item":customElements.get(e)||defineCustomElement$1()}}))}openWormhole(ScLineItemTax,["order","loading"],!1);export{ScLineItemTax as S,defineCustomElement as d};
Save
Back