"use client";

import { NextLink } from "@/components/next-link";
import {
  SiteError,
  SiteErrorActions,
  SiteErrorDescription,
  SiteErrorTitle,
} from "@/components/site-error";
import { useLoginUrl } from "@/hooks/use-url";

export default function CurrentLabUnauthorized() {
  const loginUrl = useLoginUrl();

  return (
    <SiteError>
      <SiteErrorTitle>Unauthorized</SiteErrorTitle>
      <SiteErrorDescription>Login to view lab content</SiteErrorDescription>
      <SiteErrorActions>
        <NextLink href={loginUrl}>Login</NextLink>
        <NextLink variant="ghost" href="/">
          Back to home page
        </NextLink>
      </SiteErrorActions>
    </SiteError>
  );
}
