import { FC } from 'react';

import { TablerIcon } from '@material-hu/icons/tabler';
import Stack from '@material-hu/mui/Stack';
import Typography from '@material-hu/mui/Typography';

import HuAvatar from '@material-hu/components/design-system/Avatar';

type InfoMessageProps = {
  title: string;
  subtitle: string;
  Icon: TablerIcon;
};

const InfoMessage: FC<InfoMessageProps> = props => {
  const { title, subtitle, Icon } = props;
  return (
    <Stack
      sx={{
        alignItems: 'center',
        justifyContent: 'center',
        width: '100%',
        height: '100%',
        textAlign: 'center',
      }}
    >
      <HuAvatar
        sx={{ mb: 1 }}
        size="large"
        color="primary"
        Icon={Icon}
      />
      <Typography
        variant="globalM"
        fontWeight="fontWeightSemiBold"
      >
        {title}
      </Typography>
      <Typography variant="globalXS">{subtitle}</Typography>
    </Stack>
  );
};

export default InfoMessage;
