"use client";

import Link from "next/link";

import { Ship } from "lucide-react";

import { APP_CONFIG } from "@/config/app-config";

export function PublicHeader() {
  return (
    <header className="border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
      <div className="mx-auto flex h-14 max-w-6xl items-center justify-between px-4">
        <Link href="/events" className="flex items-center gap-2 font-semibold">
          <Ship className="size-5 text-primary" />
          {APP_CONFIG.name}
        </Link>
        <nav className="flex items-center gap-4 text-sm">
          <Link href="/events" className="text-muted-foreground hover:text-foreground">
            Events
          </Link>
          <Link href="/terms" className="text-muted-foreground hover:text-foreground">
            Terms
          </Link>
          <Link href="/lookup" className="text-muted-foreground hover:text-foreground">
            Find booking
          </Link>
          <Link href="/login" className="text-muted-foreground hover:text-foreground">
            Login
          </Link>
          <Link
            href="/register"
            className="rounded-md bg-primary px-3 py-1.5 font-medium text-primary-foreground hover:bg-primary/90"
          >
            Register
          </Link>
        </nav>
      </div>
    </header>
  );
}

export function PublicFooter() {
  return (
    <footer className="mt-auto border-t py-8">
      <div className="mx-auto flex max-w-6xl flex-col gap-4 px-4 sm:flex-row sm:items-center sm:justify-between">
        <p className="text-muted-foreground text-sm" suppressHydrationWarning>
          {APP_CONFIG.copyright}
        </p>
        <div className="flex gap-4 text-sm">
          <Link href="/terms" className="text-muted-foreground hover:text-foreground">
            Terms & Conditions
          </Link>
          <Link href="/lookup" className="text-muted-foreground hover:text-foreground">
            Find booking
          </Link>
          <Link href="/login" className="text-muted-foreground hover:text-foreground">
            Login
          </Link>
          <Link href="/register" className="text-muted-foreground hover:text-foreground">
            Register
          </Link>
        </div>
      </div>
    </footer>
  );
}
