import { Metadata, ResolvingMetadata } from "next";
import {
  VenueRentalIndexView,
  loadVenueRentalIndexProps,
} from "@/components/venues/VenueRentalIndexView";
import { getSeoMetadata } from "@/lib/seo";

export async function generateMetadata(
  _: unknown,
  parent: ResolvingMetadata
): Promise<Metadata | null> {
  const { index } = await loadVenueRentalIndexProps();
  return getSeoMetadata(index, parent);
}

export default async function Page() {
  const props = await loadVenueRentalIndexProps();
  return <VenueRentalIndexView {...props} />;
}
