import { Metadata } from "next";
import Index from "@/modules/shop-by-industries";
import { generateSEO } from "@/modules/common/seo";

type Props = {
  params: Promise<{ industry: string }>;
};

// export const metadata: Metadata = {
//   title: "Vibrant Printing & Graphics",
//   description: "Vibrantprint",
// };

export async function generateMetadata({ params }: Props): Promise<Metadata> {
  const { industry } = await params;

  const readableIndustry =
    industry.charAt(0).toUpperCase() + industry.slice(1).replace(/-/g, " ");

  return generateSEO({
    title: `${readableIndustry} Printing Services`,
    description: `Shop high-quality ${readableIndustry} printing products including business cards, banners, flyers, and more.`,
    url: `https://vibrant-print.vercel.app/shop-by-industries/${industry}`,
    image: "/og-image.png",
    keywords: [
      readableIndustry,
      `${readableIndustry} printing`,
      "custom print products",
      "Vibrant Printing & Graphics",
    ],
  });
}

export default async function Page(props: Props) {
  const { industry } = await props.params;
  return <Index industryParams={industry} />;
}
