import{r as i,d as l,B as o,h as n}from"./p-03169580.js";const t=".popover-user-wrapper{--min-width:300px}popover-user ion-item-divider{--padding-start:0px}popover-user fireenjin-avatar{margin-left:16px}popover-user h5,popover-user p{display:block;--ion-color-step-600:#666666;font-size:0.9em}popover-user ion-button{display:table;margin-left:0px;margin:0 auto}";let s=class{constructor(o){i(this,o);this.fireenjinFetch=l(this,"fireenjinFetch",7);this.user={}}onSuccess(i){var l,o;if(((l=i.detail)===null||l===void 0?void 0:l.endpoint)==="findUser"&&((o=i.detail)===null||o===void 0?void 0:o.data)){console.log(i.detail);this.user={...this.user,...i.detail.data}}}componentDidLoad(){var i;if(!(o===null||o===void 0?void 0:o.isBrowser))return;this.fireenjinFetch.emit({endpoint:"findUser",params:{id:(i=this.user)===null||i===void 0?void 0:i.id,withFriends:false}})}render(){var i,l,o,t,s,a,e,r,d,u,v,p,h,c,m,f,b,x,g,w,y,k,j,z,B,$,R,S;return n("ion-content",{style:{"--background":"var(--ion-color-base)"}},n("ion-item-divider",null,n("div",{style:{width:"100%"}},n("fireenjin-avatar",{src:(i=this.user)===null||i===void 0?void 0:i.photo,slot:"start",size:"35px",style:{marginRight:"15px",float:"left",marginTop:"15px"},initials:`${((l=this.user)===null||l===void 0?void 0:l.firstName)?this.user.firstName.charAt(0):""}${((o=this.user)===null||o===void 0?void 0:o.lastName)?this.user.lastName.charAt(0):""}`}),n("h4",{style:{marginBottom:"0"}},(t=this.user)===null||t===void 0?void 0:t.firstName," ",(s=this.user)===null||s===void 0?void 0:s.lastName),n("ion-grid",null,n("ion-row",null,n("ion-col",null,((a=this.user)===null||a===void 0?void 0:a.phone)&&n("ion-button",{href:`tel:${(e=this.user)===null||e===void 0?void 0:e.phone}`,fill:"clear",color:"primary",size:"small",expand:"full"},n("ion-icon",{slot:"start",name:"call"}),"Call")),n("ion-col",null,((r=this.user)===null||r===void 0?void 0:r.address)&&n("ion-button",{href:`geo:0,0?q=${(u=(d=this.user)===null||d===void 0?void 0:d.address)===null||u===void 0?void 0:u.full}`,fill:"clear",color:"primary",size:"small",expand:"full"},n("ion-icon",{slot:"start",name:"map"}),"Map")))))),n("ion-list",null,((v=this.user)===null||v===void 0?void 0:v.email)&&n("ion-item",null,n("ion-icon",{name:"mail",class:"mail",slot:"start"}),n("ion-label",{class:"ion-text-wrap"},n("h5",null,"Email"),n("p",null,(p=this.user)===null||p===void 0?void 0:p.email))),((h=this.user)===null||h===void 0?void 0:h.slackHandle)&&n("ion-item",null,n("ion-icon",{name:"logo-slack",class:"slack",slot:"start"}),n("ion-label",{class:"ion-text-wrap"},n("h5",null,"Slack Handle "),n("p",null,"@",this.user.slackHandle))),((c=this.user)===null||c===void 0?void 0:c.company)&&n("ion-item",null,n("ion-icon",{name:"business",class:"business",slot:"start"}),n("ion-label",{class:"ion-text-wrap"},n("h5",null,"Company"),n("p",null,(f=(m=this.user)===null||m===void 0?void 0:m.company)===null||f===void 0?void 0:f.name))),((b=this.user)===null||b===void 0?void 0:b.location)&&n("ion-item",null,n("ion-icon",{name:"business",slot:"start"}),n("ion-label",{class:"ion-text-wrap"},n("h5",null,"Location"),n("p",null,(g=(x=this.user)===null||x===void 0?void 0:x.location)===null||g===void 0?void 0:g.name))),((w=this.user)===null||w===void 0?void 0:w.rating)&&n("ion-item",null,n("ion-icon",{name:"star",class:"star",slot:"start"}),n("ion-label",{class:"ion-text-wrap"},n("h5",null,"Rating"),n("p",null,(y=this.user)===null||y===void 0?void 0:y.rating," Stars"))),((k=this.user)===null||k===void 0?void 0:k.birthday)&&n("ion-item",null,n("ion-icon",{name:"ice-cream",class:"ice-cream",slot:"start"}),n("ion-label",{class:"ion-text-wrap"},n("h5",null,"Birthday"),n("p",null,(j=this.user)===null||j===void 0?void 0:j.birthday))),((z=this.user)===null||z===void 0?void 0:z.referredBy)&&n("ion-item",null,n("ion-icon",{name:"ear",class:"ear",slot:"start"}),n("ion-label",{class:"ion-text-wrap"},n("h5",null,"Referred By"),n("p",null,(($=(B=this.user)===null||B===void 0?void 0:B.referredBy)===null||$===void 0?void 0:$.firstName)?this.user.referredBy.firstName:""," ",((S=(R=this.user)===null||R===void 0?void 0:R.referredBy)===null||S===void 0?void 0:S.firstName)?this.user.referredBy.firstName:"")))))}};s.style=t;export{s as popover_user};
//# sourceMappingURL=p-93fac247.entry.js.map