"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 _chunkFJ3GTCQ3js = require('./chunk-FJ3GTCQ3.js');var _chunkW73TKQXEjs = require('./chunk-W73TKQXE.js');var _chunkARBSS6CBjs = require('./chunk-ARBSS6CB.js');var _chunkWIMFC3UGjs = require('./chunk-WIMFC3UG.js');var _chunk6RT4APSPjs = require('./chunk-6RT4APSP.js');var _react = require('react');var _utils = require('@baseapp-frontend/utils');var _material = require('@mui/material');var _jsxruntime = require('react/jsx-runtime');function l(s){"@babel/helpers - typeof";return l=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},l(s)}function j(s,e){var r=Object.keys(s);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(s);e&&(t=t.filter(function(u){return Object.getOwnPropertyDescriptor(s,u).enumerable})),r.push.apply(r,t)}return r}function x(s){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?j(Object(r),!0).forEach(function(t){N(s,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach(function(t){Object.defineProperty(s,t,Object.getOwnPropertyDescriptor(r,t))})}return s}function N(s,e,r){return(e=A(e))in s?Object.defineProperty(s,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):s[e]=r,s}function A(s){var e=_(s,"string");return l(e)=="symbol"?e:e+""}function _(s,e){if(l(s)!="object"||!s)return s;var r=s[Symbol.toPrimitive];if(r!==void 0){var t=r.call(s,e||"default");if(l(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(s)}var H=function(e){var r=e.allMessages,t=e.allMessagesLastIndex,u=e.hasNext,p=e.message,g=e.messageIndex,d=e.isGroup,w=d===void 0?!1:d,m=e.firstUnreadMessageId,c=e.SystemMessage,U=c===void 0?_chunkFJ3GTCQ3js.a:c,f=e.SystemMessageProps,G=f===void 0?{}:f,v=e.UserMessage,T=v===void 0?_chunkW73TKQXEjs.a:v,y=e.UserMessageProps,I=y===void 0?{}:y,b=_material.useTheme.call(void 0, ),E=_react.useCallback.call(void 0, function(i){var o=_optionalChain([r, 'optionalAccess', _2 => _2[i+1]]),a=_optionalChain([r, 'optionalAccess', _3 => _3[i]]),L=i===t&&!u;return L||_utils.datesDontHaveSameDay.call(void 0, _optionalChain([o, 'optionalAccess', _4 => _4.created]),_optionalChain([a, 'optionalAccess', _5 => _5.created]))?_jsxruntime.jsx.call(void 0, _chunkARBSS6CBjs.a,{color:"grey.600",variant:"caption",children:_chunkWIMFC3UGjs.a.call(void 0, _optionalChain([a, 'optionalAccess', _6 => _6.created]))}):null},[r,t,u]),$=_react.useCallback.call(void 0, function(i){var o=_optionalChain([r, 'optionalAccess', _7 => _7[i]]);return _optionalChain([o, 'optionalAccess', _8 => _8.id])===m?_jsxruntime.jsx.call(void 0, _material.Divider,{variant:"fullWidth",sx:{"&.MuiDivider-root::before, &.MuiDivider-root::after":{borderTop:"1px solid ".concat(b.palette.error.light)}},children:_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"caption",color:"error",sx:{textAlign:"center"},children:"New Messages"})}):null},[r,m,b.palette.error.light]);return p?_jsxruntime.jsxs.call(void 0, _material.Box,{display:"flex",flexDirection:"column",sx:{paddingTop:1/2,paddingRight:2},children:[$(g),E(g),p.messageType===_chunk6RT4APSPjs.b.system?_jsxruntime.jsx.call(void 0, U,x({messageRef:p},G)):_jsxruntime.jsx.call(void 0, T,x({allMessages:r,allMessagesLastIndex:t,message:p,messageIndex:g,isGroup:w},I))]}):null},ee= exports.a =H;exports.a = ee;
//# sourceMappingURL=chunk-AL2TE2JA.js.map