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

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

export const metadata: Metadata = {
  title: "My requests · Leisure Business",
  // One employee's own travel requests. Never a search result.
  robots: { index: false, follow: false },
};

/**
 * Step 3 of the employee request flow (PRD §6.2).
 *
 * Client-rendered: the list is scoped to the caller's business token, which
 * lives in localStorage, so there is nothing a server render could fetch. The
 * Suspense boundary is what useSearchParams needs — `?id=FR-1049` arrives here
 * from the submitted screen and expands that card.
 */
export default function MyRequestsPage() {
  return (
    <main className="min-h-[60vh] bg-[var(--fra-bg)]">
      <Suspense fallback={null}>
        <MyRequestsView />
      </Suspense>
    </main>
  );
}
