import{a as y}from"./chunk-VD2L3GRG.mjs";import{a as l}from"./chunk-6T5DLBVQ.mjs";import{a as d}from"./chunk-YLQRDOJ6.mjs";import{a as b,b as g}from"./chunk-MZE3OW7W.mjs";import{a as f}from"./chunk-DJ4JQ3NE.mjs";import{Suspense as R}from"react";import{LoadingState as w}from"@baseapp-frontend/design-system/components/web/displays";import{Box as _}from"@mui/material";import{useLazyLoadQuery as k}from"react-relay";import{jsx as n,jsxs as v}from"react/jsx-runtime";function s(o){"@babel/helpers - typeof";return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(o)}function h(o,e){var r=Object.keys(o);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(o);e&&(t=t.filter(function(a){return Object.getOwnPropertyDescriptor(o,a).enumerable})),r.push.apply(r,t)}return r}function p(o){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?h(Object(r),!0).forEach(function(t){M(o,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(r,t))})}return o}function M(o,e,r){return(e=D(e))in o?Object.defineProperty(o,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):o[e]=r,o}function D(o){var e=L(o,"string");return s(e)=="symbol"?e:e+""}function L(o,e){if(s(o)!="object"||!o)return o;var r=o[Symbol.toPrimitive];if(r!==void 0){var t=r.call(o,e||"default");if(s(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var x=function(e){var r=e.roomId,t=e.MessagesList,a=t===void 0?l:t,u=e.MessagesListProps,P=u===void 0?{}:u,c=e.SendMessage,S=c===void 0?d:c,m=e.SendMessageProps,j=m===void 0?{}:m,O=e.onDisplayGroupDetailsClicked,C=k(f,{roomId:r},{fetchPolicy:"store-and-network",fetchKey:r}),i=C.chatRoom;return i?v(b,{children:[n(y,{isArchived:!!i.isArchived,participantsCount:i.participantsCount,roomTitleRef:i,onDisplayGroupDetailsClicked:O,roomId:r}),v(g,{children:[n(a,p({roomRef:i},P)),n(_,{paddingRight:2,children:n(S,p({roomId:r},j))})]})]}):n("div",{children:"Chat room not found"})},I=function(e){return n(R,{fallback:n(w,{}),children:n(x,p({},e))})},N=I;export{N as a};
//# sourceMappingURL=chunk-ULLWFKJ7.mjs.map