import React from 'react';
import {useTranslation} from 'react-i18next';
import Button from '@components/Button';

import {styles} from './styles';

interface Props {
  handleOnPress: () => void;
  loading: boolean;
  attachmentsLength: number;
}

export function AttachmentsButton({
  handleOnPress,
  loading,
  attachmentsLength,
}: Props) {
  const {t} = useTranslation();
  return (
    <Button
      text={t('trainings.see_document', {count: attachmentsLength})}
      onPress={handleOnPress}
      loading={loading}
      variant="outlined"
      style={styles.button}
    />
  );
}
