import { Disposition } from '@/components/ra-forms/LongForm/types';
import { Grid, GridProps } from '@mui/material';
import _ from 'lodash';

type IContentProps = GridProps & {
  disposition?: Disposition;
};

function Content(props: IContentProps) {
  const { disposition = { xl: 9, lg: 9, md: 8, sm: 8, xs: 12 } } = props;
  const gridProps = _.omit(props, ['disposition']);
  return (
    <Grid {...gridProps} item {...disposition}>
      {props.children}
    </Grid>
  );
}

export { Content };
