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