import{r as i,d as o,h as t,H as e}from"./p-f8363b1b.js";const n=class{constructor(t){i(this,t),this.fireenjinSubmit=o(this,"fireenjinSubmit",7),this.disabled=!1}removeUserFromJob(i){confirm(`Are you sure you want to remove ${(null==i?void 0:i.firstName)?i.firstName:"this user"} from the job?`)&&(this.fireenjinSubmit.emit({endpoint:"removeUserFromJob",data:{jobId:this.jobId,userId:i.id}}),this.slidingEl&&this.slidingEl.close())}render(){var i,o,n,r,s,l;return t(e,null,t("ion-item-sliding",{ref:i=>this.slidingEl=i,disabled:this.disabled},t("ion-item",{href:this.disabled?null:`/users/${this.user.id}`,detail:!0},t("fireenjin-avatar",{style:{marginInlineEnd:"8px"},src:this.user.photo,initials:`${(null===(i=this.user)||void 0===i?void 0:i.firstName)?this.user.firstName.charAt(0):""}${(null===(o=this.user)||void 0===o?void 0:o.lastName)?this.user.lastName.charAt(0):""}`,slot:"start"}),t("ion-label",null,t("h2",null,(null===(n=this.user)||void 0===n?void 0:n.firstName)||""," ",(null===(r=this.user)||void 0===r?void 0:r.lastName)||""),t("p",null,(null===(s=this.user)||void 0===s?void 0:s.email)||"")),t("floodteam-select-role",{jobId:this.jobId,userId:null===(l=this.user)||void 0===l?void 0:l.id,value:this.role,slot:"end"})),t("ion-item-options",null,t("ion-item-option",{color:"danger",onClick:()=>this.removeUserFromJob(this.user)},t("ion-icon",{slot:"end",name:"close-circle"}),"Remove"))))}};n.style="floodteam-item-user h3,floodteam-item-user ion-text{display:block;text-indent:10px}floodteam-item-user ion-label{margin-top:5px;margin-bottom:0px;text-transform:capitalize}floodteam-item-user ion-grid ion-chip{padding:0px 15px;--background:transparent;--color:var(--ion-text-color);opacity:0.5}floodteam-item-user ion-chip ion-icon{height:15px;width:15px;color:var(--ion-text-color)}floodteam-item-user ion-grid,floodteam-item-user ion-grid ion-row,floodteam-item-user ion-grid ion-row ion-col{padding:0;margin:0}";export{n as floodteam_item_user}