D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
diafdxji
/
shihty.com
/
wp-content
/
plugins
/
surecart
/
dist
/
components
/
surecart
/
Filename :
p-de3c4dc6.entry.js
back
Copy
import{r as i,h as t,a as e}from"./p-e97fde0a.js";import{c as s}from"./p-e3f4d732.js";import{z as l}from"./p-e677365e.js";import"./p-401e165e.js";const n="";const d=n;const o=class{constructor(t){i(this,t);this.heading=undefined;this.editLink=undefined;this.customer=undefined;this.loading=undefined;this.error=undefined;this.countryChoices=undefined}componentWillLoad(){this.initCountryChoices()}async initCountryChoices(){this.countryChoices=await s()}renderContent(){var i,e,s,n,d,o,r,a;if(this.loading){return this.renderLoading()}if(!this.customer){return this.renderEmpty()}return t("sc-card",{"no-padding":true},t("sc-stacked-list",null,!!((i=this===null||this===void 0?void 0:this.customer)===null||i===void 0?void 0:i.name)&&t("sc-stacked-list-row",{style:{"--columns":"3"},mobileSize:480},t("div",null,t("strong",null,wp.i18n.__("Billing Name","surecart"))),t("div",null,(e=this.customer)===null||e===void 0?void 0:e.name),t("div",null)),!!((s=this===null||this===void 0?void 0:this.customer)===null||s===void 0?void 0:s.email)&&t("sc-stacked-list-row",{style:{"--columns":"3"},mobileSize:480},t("div",null,t("strong",null,wp.i18n.__("Billing Email","surecart"))),t("div",null,(n=this.customer)===null||n===void 0?void 0:n.email),t("div",null)),!!Object.keys(((d=this===null||this===void 0?void 0:this.customer)===null||d===void 0?void 0:d.shipping_address_display)||{}).length&&this.renderAddress(wp.i18n.__("Shipping Address","surecart"),this.customer.shipping_address_display),!!Object.keys((o=this.customer)===null||o===void 0?void 0:o.billing_address_display).length&&this.renderAddress(wp.i18n.__("Billing Address","surecart"),this.customer.billing_address_display),!!((r=this===null||this===void 0?void 0:this.customer)===null||r===void 0?void 0:r.phone)&&t("sc-stacked-list-row",{style:{"--columns":"3"},mobileSize:480},t("div",null,t("strong",null,wp.i18n.__("Phone","surecart"))),t("div",null,(a=this.customer)===null||a===void 0?void 0:a.phone),t("div",null)),(()=>{var i,e,s,n;const{number_type:d,number:o}=((i=this.customer)===null||i===void 0?void 0:i.tax_identifier)||{};if(!o||!d)return;const r=((e=l===null||l===void 0?void 0:l[d])===null||e===void 0?void 0:e.label)||wp.i18n.__("Tax Id","surecart");const a=((n=(s=this.customer)===null||s===void 0?void 0:s.tax_identifier)===null||n===void 0?void 0:n[`valid_${d}`])===false;return t("sc-stacked-list-row",{style:{"--columns":"3"},mobileSize:480},t("div",null,t("strong",null,r)),t("div",null,o," ",a&&t("sc-tag",{type:"warning"},wp.i18n.__("Invalid","surecart"))),t("div",null))})()))}renderAddress(i="Address",e){return t("sc-stacked-list-row",{style:{"--columns":"3"},mobileSize:480},t("div",null,t("strong",null,i)),t("div",{style:{whiteSpace:"pre-line"}},e),t("div",null))}renderEmpty(){return t("div",null,t("sc-divider",{style:{"--spacing":"0"}}),t("slot",{name:"empty"},t("sc-empty",{icon:"user"},wp.i18n.__("You don't have any billing information.","surecart"))))}renderLoading(){return t("sc-card",{"no-padding":true},t("sc-stacked-list",null,t("sc-stacked-list-row",{style:{"--columns":"2"},"mobile-size":0},t("div",{style:{padding:"0.5em"}},t("sc-skeleton",{style:{width:"30%",marginBottom:"0.75em"}}),t("sc-skeleton",{style:{width:"20%",marginBottom:"0.75em"}}),t("sc-skeleton",{style:{width:"40%"}})))))}render(){var i,e,s;return t("sc-dashboard-module",{key:"4182a16cc0743107c022cc76a5021261e08ad14a",exportparts:"base, heading, heading-text, heading-title, heading-description",class:"customer-details",error:this.error},t("span",{key:"6b43da52c31e1ef81f2b8bc0865f34e287f0fa3c",slot:"heading"},this.heading||wp.i18n.__("Billing Details","surecart")," ",!!((i=this===null||this===void 0?void 0:this.customer)===null||i===void 0?void 0:i.id)&&!((e=this===null||this===void 0?void 0:this.customer)===null||e===void 0?void 0:e.live_mode)&&t("sc-tag",{key:"80a09b0b70c810e451967ac110152ff348cca157",exportparts:"base:test-tag__base, content:test-tag__content",type:"warning",size:"small"},wp.i18n.__("Test","surecart"))),!!this.editLink&&!!((s=this.customer)===null||s===void 0?void 0:s.id)&&t("sc-button",{key:"49f1499b84fa34c20b5fb6be7413db7fa2277d3b",exportparts:"base:button__base, label:button__label, prefix:button__prefix",type:"link",href:this.editLink,slot:"end"},t("sc-icon",{key:"a45e0a40efcde4255e9fee7515f13cedc91fd294",name:"edit-3",slot:"prefix"}),wp.i18n.__("Update","surecart")),this.renderContent())}get el(){return e(this)}};o.style=d;export{o as sc_customer_details}; //# sourceMappingURL=p-de3c4dc6.entry.js.map