import React from 'react' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faHighlighter, faClock } from '@fortawesome/free-solid-svg-icons' interface ReaderHeaderProps { title?: string image?: string summary?: string readingTimeText?: string | null hasHighlights: boolean highlightCount: number } const ReaderHeader: React.FC = ({ title, image, summary, readingTimeText, hasHighlights, highlightCount }) => { if (image) { return (
{title {title && (

{title}

{summary &&

{summary}

}
{readingTimeText && (
{readingTimeText}
)} {hasHighlights && (
{highlightCount} highlight{highlightCount !== 1 ? 's' : ''}
)}
)}
) } return ( <> {title && (

{title}

{summary &&

{summary}

}
{readingTimeText && (
{readingTimeText}
)} {hasHighlights && (
{highlightCount} highlight{highlightCount !== 1 ? 's' : ''}
)}
)} ) } export default ReaderHeader