import{r as i,d as l,B as o,h as n}from"./p-846bd001.js";const s=class{constructor(o){i(this,o),this.fireenjinFetch=l(this,"fireenjinFetch",7),this.user={}}onSuccess(i){var l,o;"findUser"===(null===(l=i.detail)||void 0===l?void 0:l.endpoint)&&(null===(o=i.detail)||void 0===o?void 0:o.data)&&(console.log(i.detail),this.user={...this.user,...i.detail.data})}componentDidLoad(){var i;(null==o?void 0:o.isBrowser)&&this.fireenjinFetch.emit({endpoint:"findUser",params:{id:null===(i=this.user)||void 0===i?void 0:i.id,withFriends:!1}})}render(){var i,l,o,s,t,a,e,d,r,u,v,p,h,c,m,b,f,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:null===(i=this.user)||void 0===i?void 0:i.photo,slot:"start",size:"35px",style:{marginRight:"15px",float:"left",marginTop:"15px"},initials:`${(null===(l=this.user)||void 0===l?void 0:l.firstName)?this.user.firstName.charAt(0):""}${(null===(o=this.user)||void 0===o?void 0:o.lastName)?this.user.lastName.charAt(0):""}`}),n("h4",{style:{marginBottom:"0"}},null===(s=this.user)||void 0===s?void 0:s.firstName," ",null===(t=this.user)||void 0===t?void 0:t.lastName),n("ion-grid",null,n("ion-row",null,n("ion-col",null,(null===(a=this.user)||void 0===a?void 0:a.phone)&&n("ion-button",{href:`tel:${null===(e=this.user)||void 0===e?void 0:e.phone}`,fill:"clear",color:"primary",size:"small",expand:"full"},n("ion-icon",{slot:"start",name:"call"}),"Call")),n("ion-col",null,(null===(d=this.user)||void 0===d?void 0:d.address)&&n("ion-button",{href:`geo:0,0?q=${null===(u=null===(r=this.user)||void 0===r?void 0:r.address)||void 0===u?void 0:u.full}`,fill:"clear",color:"primary",size:"small",expand:"full"},n("ion-icon",{slot:"start",name:"map"}),"Map")))))),n("ion-list",null,(null===(v=this.user)||void 0===v?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,null===(p=this.user)||void 0===p?void 0:p.email))),(null===(h=this.user)||void 0===h?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))),(null===(c=this.user)||void 0===c?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,null===(b=null===(m=this.user)||void 0===m?void 0:m.company)||void 0===b?void 0:b.name))),(null===(f=this.user)||void 0===f?void 0:f.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,null===(g=null===(x=this.user)||void 0===x?void 0:x.location)||void 0===g?void 0:g.name))),(null===(w=this.user)||void 0===w?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,null===(y=this.user)||void 0===y?void 0:y.rating," Stars"))),(null===(k=this.user)||void 0===k?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,null===(j=this.user)||void 0===j?void 0:j.birthday))),(null===(z=this.user)||void 0===z?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,(null===($=null===(B=this.user)||void 0===B?void 0:B.referredBy)||void 0===$?void 0:$.firstName)?this.user.referredBy.firstName:""," ",(null===(S=null===(R=this.user)||void 0===R?void 0:R.referredBy)||void 0===S?void 0:S.firstName)?this.user.referredBy.firstName:"")))))}};s.style=".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}";export{s as popover_user}