1"use strict";(self.rspackChunkcircle=self.rspackChunkcircle||[]).push([[96753],{582882(e,n,t){var a=t(933578),r=t(358255),s=t(21281),i=t(260007),u=t(669880),l=function(e){var n=e.hideAvatar,t=void 0!==n&&n,l=e.onValueChange,o=e.selectedValue,c=e.tabs,d=e.title,f=e.trailing,m=void 0===f?null:f,g=(0,u.C)(),h=g.setTabsOverride,v=g.updateSelectedValue,b=(0,s.u)().setTitleOverride,p=(0,i.K)().setTrailingOverride,C=(0,r.u)().setIsAvatarHidden;(0,a.useEffect)(function(){return b(d),p(m),h({tabs:c,selectedValue:o,onValueChange:l}),function(){b(null),p(null),h(null)}},[d,m,c,l,h,b,p]),(0,a.useEffect)(function(){if(t)return C(!0),function(){return C(!1)}},[t,C]),(0,a.useEffect)(function(){v(o)},[o,v])};t.d(n,{Y:()=>l})},673231(e,n,t){t.d(n,{MessagesContent:()=>j});var a=t(391426),r=t(810415),s=t(715628),i=t(751212),u=t(579092),l=t(914803),o=t(617500),c=t(677123),d=t(178905),f=t(947331),m=t(417980),g=t(655726),h=t(361814),v=t(799684),b=t(700613),p=t(519104),C=t(933578),x=t(582882);function y(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t<n;t++)a[t]=e[t];return a}var k=function(e){return e>0?String((0,v.f)(e)):void 0},A=function(){var e,n=(0,d.h)().unreadChatRoomUuids,t=(void 0===n?[]:n).length,a=(0,c.IH)(),r=a.totalUnreadChatsCount,s=a.fetchTotalUnreadChatsCount,i=(0,f.UF)(),u=i.showMessagesTab,o=i.shouldShowMessagingRoutes,g=(0,l.D)(),v=(0,c.tc)(),A=v.dmSelectedTabIndex,j=v.setDmSelectedTabIndex,S=(0,p.Z)(),O=(0,b.v)(),T=O.markAllChatRoomAsRead,M=O.isLoading;(0,C.useEffect)(function(){g&&s()},[g,s]);var V=(0,C.useMemo)(function(){var e=[];return u&&e.push({value:h.$O,label:(0,m.t)("messaging.inbox")},{value:h.Cz,label:(0,m.t)("messaging.unread"),badge:k(t)}),g&&e.push({icon:"sparkles",value:h.Vx,label:(0,m.t)("messaging.agents"),badge:k(r)}),e},[u,g,t,r]),w=(0,C.useMemo)(function(){return V.map(function(e){return e.value})},[V]),I=null!=(e=w[A])?e:w[0],U=(0,C.useCallback)(function(e){var n=w.indexOf(e);-1!==n&&j(n)},[w,j]),R=(0,C.useMemo)(function(){var e;return o?((function(e){if(Array.isArray(e))return y(e)})(e=u?[{id:"mark-as-read",label:(0,m.t)("header_v3.mark_all_as_read"),icon:"checkmark-double",onClick:function(){return T()},loading:M}]:[])||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return y(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([{id:"new-message",label:(0,m.t)("new_message"),icon:"plus",onClick:function(){S({to:"/messages/$uuid",params:{uuid:"new"}})}}]):null},[o,u,T,M,S]),_=(0,C.useMemo)(function(){return R?{actions:R,collapseActions:!1}:null},[R]);(0,x.Y)({title:(0,m.t)("mobile_nav.messages"),trailing:_,hideAvatar:!1,tabs:V,selectedValue:I,onValueChange:U})},j=function(){A();var e,n=(0,d.h)().unreadChatRoomUuids,t=void 0===n?[]:n,v=t.length,b=(0,f.UF)().showMessagesTab,p=(0,l.D)(),C=(0,c.tc)().dmSelectedTabIndex,x=(0,h.Br)(b,p),y=null!=(e=x[C])?e:x[0];return(0,a.jsxs)(o.L,{children:[(0,a.jsx)(g.$,{title:(0,m.t)("direct_messaging")}),(0,a.jsxs)("div",{className:"bg-primary size-full overflow-hidden",children:[b&&y===h.$O&&(0,a.jsx)(r.Z,{}),b&&y===h.Cz&&(0===v?(0,a.jsx)(s.O,{children:(0,a.jsx)(i.N,{})}):(0,a.jsx)(r.Z,{unreadChatRoomUuids:t})),p&&y===h.Vx&&(0,a.jsx)(s.O,{children:(0,a.jsx)(u.s,{isRightActionBlock:!0})})]})]})}}}]); 2//# sourceMappingURL=/packs/js/MobileMessagesContent-382056504b3c93d5.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.