import { useTheme, useMediaQuery } from '@mui/material';

const useCurrentBreakpoint = () => {
  const theme = useTheme();
  const sm = useMediaQuery(theme.breakpoints.up('sm')) && 'sm';
  const md = useMediaQuery(theme.breakpoints.up('md')) && 'md';
  const lg = useMediaQuery(theme.breakpoints.up('lg')) && 'lg';
  const xl = useMediaQuery(theme.breakpoints.up('xl')) && 'xl';
  const xxl = useMediaQuery(theme.breakpoints.up('xxl')) && 'xxl';
  return xxl || xl || lg || md || sm || 'sm';
};

export { useCurrentBreakpoint as default };
