import { Box, LinearProgress } from '@mui/material';

type LinearWithIconProps = {
  icon: any;
  value: number;
};

function LinearWithIcon({ icon, value, ...others }: LinearWithIconProps) {
  return (
    <Box sx={{ display: 'flex', alignItems: 'center' }}>
      <Box sx={{ width: '100%', mr: 1 }}>
        <LinearProgress variant="determinate" value={value} {...others} />
      </Box>
      <Box sx={{ minWidth: 35 }}>{icon}</Box>
    </Box>
  );
}

export { LinearWithIcon };
export type { LinearWithIconProps };
