import { Link } from "@inertiajs/react"
import { ChevronRight } from "lucide-react"

type PageHeroProps = {
    title: string;
    breadcrumb: string;
}

export default function PageHero({ title, breadcrumb }: PageHeroProps) {
  return (
    <section
      className="relative h-[400px] flex items-end justify-start text-white"
      style={{
        backgroundImage:
          "url('https://images.pexels.com/photos/1105766/pexels-photo-1105766.jpeg?auto=compress&cs=tinysrgb&w=1200&h=400&fit=crop')",
        backgroundAttachment: "fixed",
        backgroundSize: "cover",
        backgroundPosition: "center",
        backgroundRepeat: "no-repeat",
      }}
    >
      {/* Overlay for better text readability */}
      <div className="absolute inset-0 bg-black/20"></div>

      <div className="relative z-10 container mx-auto px-4 py-6">
        <div className="max-w-4xl">
          <h1 className="text-5xl md:text-4xl font-bold mb-3">{title}</h1>

          {/* Breadcrumb Navigation */}
          <nav className="flex items-center space-x-2 text-white/80">
            <Link href="/" className="hover:text-white transition-colors">
              Home
            </Link>
            <ChevronRight className="h-4 w-4" />
            <span className="text-white">{breadcrumb}</span>
          </nav>
        </div>
      </div>
    </section>
  )
}
