import{c as s}from"./chunk-BHP27HO3.mjs";import{a as d}from"./chunk-7ANAA3YG.mjs";import{Divider as w}from"@mui/material";import{useFragment as h}from"react-relay";import{jsx as l,Fragment as I,jsxs as S}from"react/jsx-runtime";function b(t){"@babel/helpers - typeof";return b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},b(t)}function P(t,r){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(c){return Object.getOwnPropertyDescriptor(t,c).enumerable})),o.push.apply(o,n)}return o}function v(t){for(var r=1;r<arguments.length;r++){var o=arguments[r]!=null?arguments[r]:{};r%2?P(Object(o),!0).forEach(function(n){A(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):P(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function A(t,r,o){return(r=F(r))in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function F(t){var r=K(t,"string");return b(r)=="symbol"?r:r+""}function K(t,r){if(b(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,r||"default");if(b(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var N=function(r){var o,n,c=r.member,i=r.data,C=r.prevMember,x=r.nextMember,a=r.MemberItemComponent,m=r.memberItemComponentProps,O=r.searchQuery,e=h(d,c),p=h(d,x),u=h(d,C),f=e.status===s.active,R=u?.status!==s.active,D=!(u!=null&&u.status),Q=!(p!=null&&p.status),E=f&&R||f&&D,L=!f&&Q;if(!e)return null;if(E){var y,g;return S(I,{children:[l(w,{}),l(a,v({member:i,memberRole:"owner",status:s.active,searchQuery:O},m)),l(a,v({member:e==null||(y=e.user)===null||y===void 0?void 0:y.profile,memberRole:e?.role,status:e?.status,userId:e==null||(g=e.user)===null||g===void 0?void 0:g.id,canChangeMember:i?.canChangeRole||!1},m))]})}if(L){var M,j;return S(I,{children:[l(a,v({member:e==null||(M=e.user)===null||M===void 0?void 0:M.profile,memberRole:e?.role,status:e?.status,userId:e==null||(j=e.user)===null||j===void 0?void 0:j.id,canChangeMember:i?.canChangeRole||!1},m)),l(w,{}),l(a,v({member:i,memberRole:"owner",status:s.active,searchQuery:O},m))]})}return l(a,v({member:e==null||(o=e.user)===null||o===void 0?void 0:o.profile,memberRole:e?.role,status:e?.status,userId:e==null||(n=e.user)===null||n===void 0?void 0:n.id,canChangeMember:i?.canChangeRole||!1},m))},B=N;export{B as a};
//# sourceMappingURL=chunk-ZKTW7U2A.mjs.map