import{r as s,h as t,g as i}from"./p-b891c2f1.js";import{_ as r}from"./p-684c85b4.js";import"./p-aafd8ea4.js";import{a as o}from"./p-6fd3642a.js";import{o as a}from"./p-c2833cb1.js";import{a as e}from"./p-1c2e2695.js";import"./p-112455b1.js";const c=class{constructor(t){s(this,t)}componentWillLoad(){a(this.el,(()=>{this.fetch()}))}async fetch(){try{this.loading=!0,this.customer=await await o({path:e(`surecart/v1/customers/${this.customerId}`,{expand:["shipping_address","billing_address","tax_identifier"]})})}catch(s){this.error=(null==s?void 0:s.message)?s.message:r("Something went wrong","surecart"),console.error(this.error)}finally{this.loading=!1}}render(){return t("sc-customer-details",{customer:this.customer,loading:this.loading,error:this.error,"edit-link":e(window.location.href,{action:"edit",model:"customer",id:this.customerId})})}get el(){return i(this)}};c.style=":host{display:block;position:relative}.customer-details{display:grid;gap:0.75em}";export{c as sc_dashboard_customer_details}