import { ReportPrint } from "../../../components/report-print";

export default async function ReportPrintPage(props: {
  searchParams?: Promise<Record<string, string | string[] | undefined>>;
}) {
  const searchParams = (await props.searchParams) ?? {};
  const date = Array.isArray(searchParams.date) ? searchParams.date[0] : searchParams.date;
  const keyword = Array.isArray(searchParams.keyword)
    ? searchParams.keyword[0]
    : searchParams.keyword;
  const status = Array.isArray(searchParams.status) ? searchParams.status[0] : searchParams.status;

  return (
    <ReportPrint
      initialDate={date}
      initialKeyword={keyword}
      initialStatus={status}
    />
  );
}
