import { redirect } from "next/navigation";

import {
  AddConsultantPage,
  AddGuidesPage,
  VideoGuidesPage,
} from "@/components/domains/additional-purchases";
import { ROUTES } from "@/shared/constants/client-routes";

interface AdditionalProductPageProps {
  params: Promise<{ pageType: string }>;
}

export default async function AdditionalProductPage({
  params,
}: AdditionalProductPageProps) {
  const { pageType } = await params;

  switch (pageType) {
    case "add_consultant":
      return <AddConsultantPage />;
    case "add_guides":
      return <AddGuidesPage />;
    case "video_guides":
      return <VideoGuidesPage />;
    default:
      return redirect(ROUTES.home());
  }
}
