import { type FC, type PropsWithChildren } from 'react';

import Container from '@material-hu/mui/Container';
import { type Breakpoint, type SxProps } from '@material-hu/mui/styles';

type Props = {
  sx?: SxProps;
  maxWidth?: Breakpoint | false;
};

const ContainerLayout: FC<PropsWithChildren<Props>> = ({
  children,
  maxWidth = 'lg',
  sx = {},
}) => {
  return (
    <Container
      maxWidth={maxWidth}
      sx={{ marginInline: 'auto', pt: 6, ...sx }}
    >
      {children}
    </Container>
  );
};

export default ContainerLayout;
