import { pathsConfig } from "~/config/paths";
import { WhyRatingLogo } from "~/modules/common/whyrating-logo";
import { TurboLink } from "~/modules/common/turbo-link";

export default async function AuthLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <main className="grid h-full w-full flex-1 lg:grid-cols-2">
      <section className="flex h-full flex-col items-center justify-center p-6 lg:p-10">
        <header className="text-navy -mt-1 mb-auto flex self-start justify-self-start">
          <TurboLink
            href={pathsConfig.index}
            className="flex shrink-0 items-center gap-3"
            aria-label="whyrating.com"
          >
            <WhyRatingLogo />
          </TurboLink>
        </header>
        <div className="mt-16 mb-auto flex w-full max-w-md flex-col gap-6 pb-16">
          {children}
        </div>
      </section>

      <aside className="bg-muted hidden flex-1 lg:block"></aside>
    </main>
  );
}
