import{r as i,d as o,h as t,H as e}from"./p-03169580.js";const n="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}";let r=class{constructor(t){i(this,t);this.fireenjinSubmit=o(this,"fireenjinSubmit",7);this.disabled=false}removeUserFromJob(i){if(!confirm(`Are you sure you want to remove ${(i===null||i===void 0?void 0:i.firstName)?i.firstName:"this user"} from the job?`))return;this.fireenjinSubmit.emit({endpoint:"removeUserFromJob",data:{jobId:this.jobId,userId:i.id}});if(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:true},t("fireenjin-avatar",{style:{marginInlineEnd:"8px"},src:this.user.photo,initials:`${((i=this.user)===null||i===void 0?void 0:i.firstName)?this.user.firstName.charAt(0):""}${((o=this.user)===null||o===void 0?void 0:o.lastName)?this.user.lastName.charAt(0):""}`,slot:"start"}),t("ion-label",null,t("h2",null,((n=this.user)===null||n===void 0?void 0:n.firstName)||""," ",((r=this.user)===null||r===void 0?void 0:r.lastName)||""),t("p",null,((s=this.user)===null||s===void 0?void 0:s.email)||"")),t("floodteam-select-role",{jobId:this.jobId,userId:(l=this.user)===null||l===void 0?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"))))}};r.style=n;export{r as floodteam_item_user};
//# sourceMappingURL=p-934fc6b3.entry.js.map