import { useTranslation } from "react-i18n-lite";

interface ResumeReadingButtonProps {
  visible: boolean;
  onResume: () => void;
}

export function ResumeReadingButton({ visible, onResume }: ResumeReadingButtonProps) {
  const { t } = useTranslation();

  if (!visible) return null;

  return (
    <button
      type="button"
      className="reader-resume-reading"
      onClick={onResume}
      aria-label={t("reader.resumeReadingAria")}
    >
      <span className="reader-resume-reading-icon" aria-hidden>
        ↩
      </span>
      <span className="reader-resume-reading-label">{t("reader.resumeReading")}</span>
    </button>
  );
}
