import EmployeeDetailView from "@/features/employees/employee-detail-view";
import { Suspense } from "react";

type PageProps = {
  params: { app: string; id: string };
};

function EmployeeDetailFallback() {
  return <div className="text-sm text-gray-500">Loading…</div>;
}

function EmployeeDetailShell({ app, id }: { app: string; id: string }) {
  return <EmployeeDetailView app={app} employeeId={id} />;
}

export default function Page({ params }: PageProps) {
  return (
    <Suspense fallback={<EmployeeDetailFallback />}>
      <EmployeeDetailShell app={params.app} id={params.id} />
    </Suspense>
  );
}
