"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 _chunkHLNCHUGUjs = require('./chunk-HLNCHUGU.js');var _chunkEVQXPO7Njs = require('./chunk-EVQXPO7N.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 M=function(r){var a=r.profile,h=r.handleAddMember,f=r.handleRemoveMember,m=r.isMember,o=m===void 0?!1:m,i=_reactrelay.useFragment.call(void 0, _chunkEVQXPO7Njs.a,a),p=i.id,u=i.name,n=i.image,t=i.urlPath;return _jsxruntime.jsxs.call(void 0, _chunkHLNCHUGUjs.a,{children:[_jsxruntime.jsx.call(void 0, _avatars.AvatarWithPlaceholder,{width:48,height:48,src:_optionalChain([n, '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",children:u}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"caption",color:"text.secondary",children:_optionalChain([t, 'optionalAccess', _2 => _2.path])&&"@".concat(t.path)})]}),_jsxruntime.jsx.call(void 0, _material.Button,{color:"inherit",variant:"text",size:"small",onClick:function(){o?f(a):h(a)},sx:{maxWidth:"fit-content",justifySelf:"end"},children:_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"button",color:o?"error.main":"text.primary",children:o?"Remove":"Add"})})]},"chat-room-item-".concat(p))},k= exports.a =M;exports.a = k;
//# sourceMappingURL=chunk-HNSB2AJI.js.map