import React from 'react';
import PropTypes from 'prop-types';
import styles from './author-box.module.scss';
import AuthorDetails from '../details';
import AuthorDescription from '../description';
import FactCheck from './fact-check';

export default function AuthorBox({ author, reviewer = {}, readingTime = '', date = '' }) {
  return (
    <div className={styles.container || ''} id="authorbox">
      <AuthorDetails template="templateTwo" ribbon author={author} extraInfo />
      <AuthorDescription template="templateTwo" author={author} />
      <FactCheck author={author} reviewer={reviewer} readingTime={readingTime} date={date} />
    </div>
  );
}

AuthorBox.propTypes = {
  author: PropTypes.shape({}),
  reviewer: PropTypes.string,
  readingTime: PropTypes.string,
  date: PropTypes.string,
};
