import { FC } from 'react';

import Box from '@material-hu/mui/Box';

import Button from '@material-hu/components/design-system/Buttons/Button';

export type FinalizeButtonProps = {
  disabled: boolean;
  onClick: () => void;
  label: string;
};

export const FinalizeButton: FC<FinalizeButtonProps> = props => {
  const { disabled = false, onClick, label } = props;

  return (
    <Box textAlign="center">
      <Button
        variant="contained"
        sx={{ mb: 6, mt: 2, width: '20%' }}
        size="large"
        color="primary"
        disabled={disabled}
        onClick={onClick}
      >
        {label}
      </Button>
    </Box>
  );
};

export default FinalizeButton;
