import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';
import classNames from 'clsx';

import { Grid } from '@/mui/components';

import styles from './Layout.module.scss';

const Layout = forwardRef(({ contentClassName = null, ...props }, ref) => (
  <Grid container className={styles.Layout}>
    <Grid className={classNames(styles.Content, contentClassName)} ref={ref}>
      {props.children}
    </Grid>
  </Grid>
));

Layout.propTypes = {
  contentClassName: PropTypes.string,
  children: PropTypes.node.isRequired,
};

export default Layout;
