import Link from 'next/link';

import { MedReportLogo } from './med-report-title';

function LogoImage({
  className,
}: {
  className?: string;
  width?: number;
}) {
  return <MedReportLogo className={className} />;
}

export function AppLogo({
  href,
  label,
  className,
}: {
  href?: string | null;
  className?: string;
  label?: string;
}) {
  if (href === null) {
    return <LogoImage className={className} />;
  }

  return (
    <Link aria-label={label ?? 'Home Page'} href={href ?? '/'} prefetch={true}>
      <LogoImage className={className} />
    </Link>
  );
}
