import { Suspense } from "react";
import type { Metadata } from "next";

import { SubmittedView } from "@/components/employee-requests/SubmittedView";

export const metadata: Metadata = {
  title: "Request submitted · Leisure Business",
  // The receipt for one person's trip — never a search result.
  robots: { index: false, follow: false },
};

/**
 * Step 2 of the employee request flow.
 *
 * A route of its own rather than a state inside the overlay, so the reference
 * survives a reload and can be sent to someone. All of its content comes from
 * the client (the submit response, or the list endpoint as a fallback), so the
 * server renders only the shell — hence the Suspense boundary, which
 * useSearchParams requires.
 */
export default function RequestSubmittedPage() {
  return (
    <main className="min-h-[60vh] bg-[var(--fra-bg)]">
      <Suspense fallback={null}>
        <SubmittedView />
      </Suspense>
    </main>
  );
}
