"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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 _chunk6KSITBXOjs = require('./chunk-6KSITBXO.js');var _chunkZ7YFFB66js = require('./chunk-Z7YFFB66.js');var _authentication = require('@baseapp-frontend/authentication');var _reactrelay = require('react-relay');var _relayconnectionhandlerplus = require('relay-connection-handler-plus'); var _relayconnectionhandlerplus2 = _interopRequireDefault(_relayconnectionhandlerplus);var A=function(o){var n,r=_reactrelay.useFragment.call(void 0, _chunkZ7YFFB66js.a,o);return{title:_optionalChain([r, 'optionalAccess', _2 => _2.title]),avatar:r==null||(n=r.image)===null||n===void 0?void 0:n.url}},g=function(o){var n,r,l=_authentication.useCurrentProfile.call(void 0, ),v=l.currentProfile,d=_reactrelay.useFragment.call(void 0, _chunk6KSITBXOjs.a,o);if(!(d!=null&&d.participants))return{title:"Error: No participants"};var t=d.participants.edges.find(function(e){var i,a;return(e==null||(i=e.node)===null||i===void 0||(i=i.profile)===null||i===void 0?void 0:i.id)&&(e==null||(a=e.node)===null||a===void 0||(a=a.profile)===null||a===void 0?void 0:a.id)!==_optionalChain([v, 'optionalAccess', _3 => _3.id])});return{title:t==null||(n=t.node)===null||n===void 0||(n=n.profile)===null||n===void 0?void 0:n.name,avatar:t==null||(r=t.node)===null||r===void 0||(r=r.profile)===null||r===void 0||(r=r.image)===null||r===void 0?void 0:r.url}},_= exports.b =function(o){var n=g(o),r=A(o);return o.isGroup?r:n},$= exports.c =function(o){if(o!=null)return"".concat(o," member").concat(o!==1?"s":"")},x= exports.d =function(o,n,r){var l=o.get(n);return l?_relayconnectionhandlerplus2.default.getConnections(l,"roomsList_chatRooms",r):[]};exports.a = A; exports.b = _; exports.c = $; exports.d = x;
//# sourceMappingURL=chunk-KIVWK2EB.js.map