"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[5774],{15774:(e,t,s)=>{s.r(t),s.d(t,{default:()=>y});var a=s(36418),r=s.n(a),i=s(37270),o=s(45955),n=s(7430),l=s(14778),u=s(61486),c=s(79751),d=s(20463),m=s(25695),_=s(19408),p=s(78451),g=s(11039),E=s(47551),I=s(35631),M=s(3569),f=s(77440);function h(){return function(){const e=(0,E.A)(),t=(0,i.useDispatch)(),s=(0,l.useIntl)(),[r,o]=(0,g.A)(),n=(0,i.useSelector)(d.ks),h=r?.messages?.history,[y,C]=function(e,t){const s=(0,i.useDispatch)(),r=(0,i.useSelector)(M.WR),o=(0,i.useSelector)((s=>(0,f.Jt)(s,e,t))),n=(0,a.useCallback)((a=>{const i={category:e,name:t,user_id:r,value:a};return s((0,I.SF)(r,[i]))}),[e,s,t,r]);return(0,a.useMemo)((()=>[o,n]),[o,n])}(p.pm.CATEGORY_CLOUD_LIMITS,p.pm.SHOWN_LIMITS_REACHED_ON_LOGIN),{openPricingModal:S,isAirGapped:L}=(0,_.A)();if(o&&e.messages.historyLoaded&&void 0!==h&&n&&"true"!==y){if(e.messages.history>h){C("true");const e={title:(0,l.defineMessage)({id:"workspace_limits.modals.limits_reached.title",defaultMessage:"{limitName} limit reached",values:{limitName:s.formatMessage({id:"workspace_limits.modals.limits_reached.title.message_history",defaultMessage:"Message history"})}}),description:(0,l.defineMessage)({id:"workspace_limits.modals.limits_reached.description.message_history",defaultMessage:"Your sent message history is no longer available but you can still send messages. Upgrade to a paid plan and get unlimited access to your message history."}),secondaryAction:{message:(0,l.defineMessage)({id:"workspace_limits.modals.close",defaultMessage:"Close"}),onClick:()=>{t((0,c.O)(p.IQ.CLOUD_LIMITS))}},onClose:()=>{t((0,c.O)(p.IQ.CLOUD_LIMITS))}};L||(e.primaryAction={message:(0,l.defineMessage)({id:"workspace_limits.modals.view_plan_options",defaultMessage:"View plan options"}),onClick:()=>{t((0,c.O)(p.IQ.CLOUD_LIMITS)),S()}}),t((0,c.q)({modalId:p.IQ.CLOUD_LIMITS,dialogType:m.A,dialogProps:e}))}t((0,u.Qq)(!1))}}(),null}function y(){const e=(0,i.useSelector)(o.I0),t=(0,i.useSelector)(n.J1);return e&&t?r().createElement(h,null):null}},61486:(e,t,s)=>{s.d(t,{N5:()=>u,Qp:()=>c,Qq:()=>n,p$:()=>l,rN:()=>d});var a=s(1418),r=s(87988),i=s(40693),o=s(78451);function n(e){return{type:o.Q3.NEEDS_LOGGED_IN_LIMIT_REACHED_CHECK,data:e}}function l(e){return e?{type:o.Q3.SET_ADMIN_CONSOLE_USER_MANAGEMENT_TABLE_PROPERTIES,data:e}:{type:o.Q3.CLEAR_ADMIN_CONSOLE_USER_MANAGEMENT_TABLE_PROPERTIES,data:null}}function u(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(t,s)=>{let o;try{o=await i.mT.getUsersForReporting(e)}catch(e){return(0,r.UP)(e,t,s),t((0,a.vV)(e)),{error:e}}return{data:o}}}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(t,s)=>{let o;try{o=await i.mT.getUserCountForReporting(e)}catch(e){return(0,r.UP)(e,t,s),t((0,a.vV)(e)),{error:e}}return{data:o}}}function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(t,s)=>{try{await i.mT.startUsersBatchExport(e)}catch(e){return(0,r.UP)(e,t,s),t((0,a.vV)(e)),{error:e}}return{data:!0}}}}}]);
//# sourceMappingURL=5774.8cf8103035b14d616080.js.map