D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
diafdxji
/
shihty.com
/
wp-content
/
plugins
/
surecart
/
dist
/
components
/
surecart
/
Filename :
p-23b60ebb.entry.js
back
Copy
import{r as t,h as e,a as s}from"./p-e97fde0a.js";import{a as i}from"./p-dd3464cd.js";import{o as r}from"./p-b719a497.js";import{a}from"./p-401e165e.js";import"./p-d3366af3.js";const o=":host{display:block;position:relative}.customer-details{display:grid;gap:0.75em}";const d=o;const n=class{constructor(e){t(this,e);this.customerId=undefined;this.heading=undefined;this.customer=undefined;this.loading=undefined;this.error=undefined}componentWillLoad(){r(this.el,(()=>{this.fetch()}))}async fetch(){if(""===this.customerId){return}try{this.loading=true;this.customer=await await i({path:a(`surecart/v1/customers/${this.customerId}`,{expand:["shipping_address","billing_address","tax_identifier"]})})}catch(t){if(t===null||t===void 0?void 0:t.message){this.error=t.message}else{this.error=wp.i18n.__("Something went wrong","surecart")}console.error(this.error)}finally{this.loading=false}}render(){return e("sc-customer-details",{key:"daa6010b4f0b5ace8987b50dfdaa0818df7fd0f8",exportparts:"base, heading, heading-text, heading-title, heading-description, error__base, error__icon, error__text, error__title, error__message, test-tag__base, test-tag__content, button__base, button__label, button__prefix",customer:this.customer,loading:this.loading,error:this.error,heading:this.heading,"edit-link":a(window.location.href,{action:"edit",model:"customer",id:this.customerId})})}get el(){return s(this)}};n.style=d;export{n as sc_dashboard_customer_details}; //# sourceMappingURL=p-23b60ebb.entry.js.map