"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[7012],{57012:(e,t,n)=>{n.r(t),n.d(t,{default:()=>h});var a=n(19783),r=n.n(a),s=n(84390),c=n(70314),d=n(41488),i=n(39183),E=n(83282),L=n(23712);const h=function(){const e=(0,c.useDispatch)(),t=(0,s.useRef)(window.matchMedia("(max-width: ".concat(L.default.SMALL_SIDEBAR_BREAKPOINT,"px)"))).current,n=(0,s.useRef)(window.matchMedia("(min-width: ".concat(L.default.SMALL_SIDEBAR_BREAKPOINT+1,"px) and (max-width: ").concat(L.default.MEDIUM_SIDEBAR_BREAKPOINT,"px)"))).current,a=(0,s.useRef)(window.matchMedia("(min-width: ".concat(L.default.MEDIUM_SIDEBAR_BREAKPOINT+1,"px) and (max-width: ").concat(L.default.LARGE_SIDEBAR_BREAKPOINT,"px)"))).current,h=(0,s.useRef)(window.matchMedia("(min-width: ".concat(L.default.LARGE_SIDEBAR_BREAKPOINT+1,"px)"))).current,m=(0,s.useCallback)((()=>{switch(!0){case h.matches:e((0,d.jz)(E.EJ.XLARGE)),e((0,i.nh)(E.EJ.XLARGE));break;case a.matches:e((0,d.jz)(E.EJ.LARGE)),e((0,i.nh)(E.EJ.LARGE));break;case n.matches:e((0,d.jz)(E.EJ.MEDIUM)),e((0,i.nh)(E.EJ.MEDIUM));break;case t.matches:e((0,d.jz)(E.EJ.SMALL)),e((0,i.nh)(E.EJ.SMALL))}}),[e]),o=(0,s.useCallback)(r()((()=>{e((0,d.jz)()),e((0,i.nh)())}),100),[]),u=(0,s.useCallback)((e=>{e.matches&&m()}),[m]);return(0,s.useEffect)((()=>(m(),t.addEventListener?(h.addEventListener("change",u),a.addEventListener("change",u),n.addEventListener("change",u),t.addEventListener("change",u)):t.addListener?(h.addListener(u),a.addListener(u),n.addListener(u),t.addListener(u)):window.addEventListener("resize",o),()=>{t.removeEventListener?(h.removeEventListener("change",u),a.removeEventListener("change",u),n.removeEventListener("change",u),t.removeEventListener("change",u)):t.removeListener?(h.removeListener(u),a.removeListener(u),n.removeListener(u),t.removeListener(u)):window.removeEventListener("resize",o)})),[u,o,m]),null}}}]);
//# sourceMappingURL=7012.e618664c483f812b58b0.js.map