// src/components/home/Banner.tsx
"use client";
import Image from "next/image";
import { useCompany } from "@/components/providers/CompanyProvider";

export default function Banner() {
	const company = useCompany();
	const bannerSrc = `${process.env.NEXT_PUBLIC_DIRECTUS_URL}/assets/${company.top_banner}`;

	return (
		<section className="relative w-full aspect-[16/9] overflow-hidden">
			<Image
				src={bannerSrc}
				alt={`${company.name} トップバナー`}
				fill
				priority
				className="w-full h-auto object-cover"
			/>
		</section>
	);
}
