"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[7438],{33856:(e,t,s)=>{s.d(t,{Pc:()=>c,ZJ:()=>d,am:()=>l,g8:()=>o,w2:()=>u}),s(61418);var a=s(17554),r=s(98644),i=s(80139),n=s(23712);function o(e){return{type:n.MF.NEEDS_LOGGED_IN_LIMIT_REACHED_CHECK,data:e}}function l(e){return e?{type:n.MF.SET_ADMIN_CONSOLE_USER_MANAGEMENT_TABLE_PROPERTIES,data:e}:{type:n.MF.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 n;try{n=await i.je.getUsersForReporting(e)}catch(e){return(0,r._f)(e,t,s),t((0,a.H)(e)),{error:e}}return{data:n}}}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(t,s)=>{let n;try{n=await i.je.getUserCountForReporting(e)}catch(e){return(0,r._f)(e,t,s),t((0,a.H)(e)),{error:e}}return{data:n}}}function d(e){return async(t,s)=>{try{await i.je.startUsersBatchExport(e)}catch(e){return(0,r._f)(e,t,s),t((0,a.H)(e)),{error:e}}return{data:!0}}}},7438:(e,t,s)=>{s.r(t),s.d(t,{default:()=>I});var a=s(84390),r=s.n(a),i=s(70314),n=s(80947),o=s(23894),l=(s(14078),s(72060)),u=s(33856),c=s(40364),d=s(5123),_=s(24494),m=s(92287),g=s(23712),p=s(32397),M=s(34250),h=s(32394),E=s(66900),f=s(83905);function y(){return function(){var e;const t=(0,M.Z)(),s=(0,i.useDispatch)(),r=(0,l.useIntl)(),[n,o]=(0,p.Z)(),y=(0,i.useSelector)(d.qH),I=null==n||null===(e=n.messages)||void 0===e?void 0:e.history,[C,L]=function(e,t){const s=(0,i.useDispatch)(),r=(0,i.useSelector)(E.rc),n=(0,i.useSelector)((s=>(0,f.U2)(s,e,t))),o=(0,a.useCallback)((a=>{const i={category:e,name:t,user_id:r,value:a};return s((0,h.$A)(r,[i]))}),[e,t,r]);return(0,a.useMemo)((()=>[n,o]),[n,o])}(g.uP.CATEGORY_CLOUD_LIMITS,g.uP.SHOWN_LIMITS_REACHED_ON_LOGIN),S=(0,m.Z)();o&&t.messages.historyLoaded&&void 0!==I&&y&&"true"!==C&&(t.messages.history>I&&(L("true"),s((0,c.h)({modalId:g.r8.CLOUD_LIMITS,dialogType:_.Z,dialogProps:{title:(0,l.defineMessage)({id:"workspace_limits.modals.limits_reached.title",defaultMessage:"{limitName} limit reached",values:{limitName:r.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:()=>{s((0,c.M)(g.r8.CLOUD_LIMITS))}},primaryAction:{message:(0,l.defineMessage)({id:"workspace_limits.modals.view_plan_options",defaultMessage:"View plan options"}),onClick:()=>{s((0,c.M)(g.r8.CLOUD_LIMITS)),S({trackingLocation:"admin_login_limit_reached_dashboard"})}},onClose:()=>{s((0,c.M)(g.r8.CLOUD_LIMITS))},needsTheme:!0}}))),s((0,u.g8)(!1)))}(),null}function I(){const e=(0,i.useSelector)(n.VF),t=(0,i.useSelector)(o.BW);return e&&t?r().createElement(y,null):null}}}]);
//# sourceMappingURL=7438.d7d8047661ea4959905f.js.map