"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[7594],{67594:(e,t,n)=>{n.r(t),n.d(t,{default:()=>h});var a=n(32858),s=n.n(a),r=n(97023),c=n(23453),i=n(62844),d=n(2386),L=n(71769),E=n(78451);const h=function(){const e=(0,c.useDispatch)(),t=(0,r.useRef)(window.matchMedia("(max-width: ".concat(E.Ay.SMALL_SIDEBAR_BREAKPOINT,"px)"))).current,n=(0,r.useRef)(window.matchMedia("(min-width: ".concat(E.Ay.SMALL_SIDEBAR_BREAKPOINT+1,"px) and (max-width: ").concat(E.Ay.MEDIUM_SIDEBAR_BREAKPOINT,"px)"))).current,a=(0,r.useRef)(window.matchMedia("(min-width: ".concat(E.Ay.MEDIUM_SIDEBAR_BREAKPOINT+1,"px) and (max-width: ").concat(E.Ay.LARGE_SIDEBAR_BREAKPOINT,"px)"))).current,h=(0,r.useRef)(window.matchMedia("(min-width: ".concat(E.Ay.LARGE_SIDEBAR_BREAKPOINT+1,"px)"))).current,m=(0,r.useCallback)((()=>{switch(!0){case h.matches:e((0,i.$B)(L.sK.XLARGE)),e((0,d.hf)(L.sK.XLARGE));break;case a.matches:e((0,i.$B)(L.sK.LARGE)),e((0,d.hf)(L.sK.LARGE));break;case n.matches:e((0,i.$B)(L.sK.MEDIUM)),e((0,d.hf)(L.sK.MEDIUM));break;case t.matches:e((0,i.$B)(L.sK.SMALL)),e((0,d.hf)(L.sK.SMALL))}}),[e]),o=(0,r.useCallback)(s()((()=>{e((0,i.$B)()),e((0,d.hf)())}),100),[]),A=(0,r.useCallback)((e=>{e.matches&&m()}),[m]);return(0,r.useEffect)((()=>(m(),t.addEventListener?(h.addEventListener("change",A),a.addEventListener("change",A),n.addEventListener("change",A),t.addEventListener("change",A)):t.addListener?(h.addListener(A),a.addListener(A),n.addListener(A),t.addListener(A)):window.addEventListener("resize",o),()=>{t.removeEventListener?(h.removeEventListener("change",A),a.removeEventListener("change",A),n.removeEventListener("change",A),t.removeEventListener("change",A)):t.removeListener?(h.removeListener(A),a.removeListener(A),n.removeListener(A),t.removeListener(A)):window.removeEventListener("resize",o)})),[A,o,m]),null}}}]);
//# sourceMappingURL=7594.695a7656611d1155c10e.js.map