import { Stack, type SxProps, Typography } from '@mui/material';

import { type CriteriaDrawerContentProps } from './types';

const CriteriaDrawerContent = ({
  description,
  sx,
  slotProps = {},
  children,
}: CriteriaDrawerContentProps) => {
  const { root: rootProps, description: descriptionProps } = slotProps;

  return (
    <Stack
      {...rootProps}
      sx={
        {
          gap: 2,
          height: '100%',
          ...sx,
          ...rootProps?.sx,
        } as SxProps
      }
    >
      <Typography
        variant="globalS"
        {...descriptionProps}
      >
        {description}
      </Typography>
      {children}
    </Stack>
  );
};

export default CriteriaDrawerContent;
