"use client";

import { useParams, notFound } from "next/navigation";
import HrComingSoonPage from "@/features/hr/hr-coming-soon-page";
import { getPlatformModule } from "@/platform/constants/modules";

const ALLOWED_APPS = new Set(["client", "property", "super-admin"]);

export default function TenantModuleComingSoonPage() {
  const { app, moduleId } = useParams() as { app: string; moduleId: string };
  if (!ALLOWED_APPS.has(app)) {
    notFound();
  }
  const mod = getPlatformModule(String(moduleId));
  if (!mod) {
    notFound();
  }
  return (
    <HrComingSoonPage
      title={mod.name}
      description={`${mod.description} This workspace is enabled for your organization; the full ${mod.name} screens are coming next.`}
    />
  );
}
