import HuDialog from '@material-hu/components/design-system/Dialog';

import { useLokaliseTranslation } from 'src/utils/i18n';

const CloseSatisfactionSurvey = ({
  onCancel,
  onConfirm,
}: {
  onCancel: () => void;
  onConfirm: () => void;
}) => {
  const { t } = useLokaliseTranslation(['learning', 'general']);

  return (
    <HuDialog
      onClose={onCancel}
      title={t('course.satisfaction_survey.close.title')}
      textBody={t('course.satisfaction_survey.close.description')}
      primaryButtonProps={{
        children: t('general:exit'),
        onClick: onConfirm,
      }}
      secondaryButtonProps={{
        children: t('general:cancel'),
        onClick: onCancel,
      }}
    />
  );
};

export default CloseSatisfactionSurvey;
