import{r as c}from"./vendor-react-wBh_31cN.js";import{J as R}from"./index-BKr2rJhV.js";import{d as T}from"./index-BeaoFlb1.js";import{P as s}from"./project-eQY1xQe-.js";import{c as f}from"./vendor-router-D1GqFWiT.js";const O=()=>{var n,u,p;const{id:m}=f(),r=T(+m,{skip:!m}),{data:{email:o}={}}=R(),j=c.useMemo(()=>{var t;const e=(t=r.currentData)==null?void 0:t.projectTeam.find(a=>a.projectTeamPK.teamMember===o);return e!=null&&e.teamRole?e==null?void 0:e.teamRole:s.ALL},[o,(n=r.currentData)==null?void 0:n.projectTeam]),i=c.useMemo(()=>{var t;const e=(t=r.currentData)==null?void 0:t.projectTeam.find(a=>a.projectTeamPK.teamMember===o);return(e==null?void 0:e.teamRole)===s.DATA_OWNER},[o,(u=r.currentData)==null?void 0:u.projectTeam]),P=c.useMemo(()=>{var t;const e=(t=r.currentData)==null?void 0:t.projectTeam.find(a=>a.projectTeamPK.teamMember===o);return(e==null?void 0:e.teamRole)===s.OBSERVER},[o,(p=r.currentData)==null?void 0:p.projectTeam]);return{userProjectRole:j,isDataOwner:i,isObserver:P}};export{O as u};
