import{a as e,n as t}from"./preload-helper-DxX6f4wy.js";import{V as n,it as r}from"./Fade-Bj1YUcWe.js";import{t as i}from"./getThemeProps-Ct9I61Jz.js";import{c as a}from"./ButtonBase-dVPwHUcG.js";var o=e(t());function s(e,t,n,r,i){let[s,c]=o.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return a(()=>{if(!n)return;let t=n(e),r=()=>{c(t.matches)};return r(),t.addEventListener(`change`,r),()=>{t.removeEventListener(`change`,r)}},[e,n]),s}var c={...o}.useSyncExternalStore;function l(e,t,n,r,i){let a=o.useCallback(()=>t,[t]),s=o.useMemo(()=>{if(i&&n)return()=>n(e).matches;if(r!==null){let{matches:t}=r(e);return()=>t}return a},[a,e,r,i,n]),[l,u]=o.useMemo(()=>{if(n===null)return[a,()=>()=>{}];let t=n(e);return[()=>t.matches,e=>(t.addEventListener(`change`,e),()=>{t.removeEventListener(`change`,e)})]},[a,n,e]);return c(u,l,s)}function u(e={}){let{themeId:t}=e;return function(e,r={}){let a=n();a&&t&&(a=a[t]||a);let o=typeof window<`u`&&window.matchMedia!==void 0,{defaultMatches:u=!1,matchMedia:d=o?window.matchMedia:null,ssrMatchMedia:f=null,noSsr:p=!1}=i({name:`MuiUseMediaQuery`,props:r,theme:a}),m=typeof e==`function`?e(a):e;return m=m.replace(/^@media( ?)/m,``),m.includes(`print`)&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.",`Using the print media query to modify print styles can lead to unexpected results.`,"Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
`)),(c===void 0?s:l)(m,u,d,f,p)}}u();var d=u({themeId:r});export{d as t};