"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk7I5XGIYXjs = require('./chunk-7I5XGIYX.js');var _chunk2QL2RIUWjs = require('./chunk-2QL2RIUW.js');var _avatars = require('@baseapp-frontend/design-system/components/web/avatars');var _material = require('@mui/material');var _reactrelay = require('react-relay');var _jsxruntime = require('react/jsx-runtime');var P=function(e){var n=e.profile,g=e.handleAddMember,x=e.handleRemoveMember,o=e.isBeingAdded,f=o===void 0?!1:o,l=e.isExistingMember,r=l===void 0?!1:l,t=_reactrelay.useFragment.call(void 0, _chunk2QL2RIUWjs.a,n),p=t.id,d=t.image,u=t.name,i=t.urlPath,v=function(M){var A=M.target;A.checked?g(n):x(n)},b=function(){return r?"Already added to the group":i!=null&&i.path?"@".concat(i.path):""};return _jsxruntime.jsxs.call(void 0, _chunk7I5XGIYXjs.a,{children:[_jsxruntime.jsx.call(void 0, _avatars.AvatarWithPlaceholder,{width:48,height:48,src:_optionalChain([d, 'optionalAccess', _ => _.url]),sx:{alignSelf:"center",justifySelf:"center"}}),_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"grid",gridTemplateRows:"repeat(2, minmax(0, 1fr))"},children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"subtitle2",color:r?"text.disabled":"text.primary",children:u}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"caption",color:r?"text.disabled":"text.secondary",sx:{fontStyle:r?"italic":"normal"},children:b()})]}),!r&&_jsxruntime.jsx.call(void 0, _material.Checkbox,{checked:f,onChange:v})]},"chat-room-item-".concat(p))},I= exports.a =P;exports.a = I;
//# sourceMappingURL=chunk-IPFDVV5W.js.map