//src\components\LateStartReportGen\LateStartReportGen.tsx
"use client";
import React, { useMemo, useState } from "react";
import SearchBox, { Criterion } from "../ReportSearchBox7";
import { useTranslation } from "react-i18next";
import { ProjectClaims } from "@/app/api/report7";
//import { DownloadReportButton } from './DownloadReportButton';
interface Props {
  projects: ProjectClaims[];
}
type SearchQuery = Partial<Omit<ProjectClaims, "id">>;
type SearchParamNames = keyof SearchQuery;

const ProgressByClientSearch: React.FC<Props> = ({ projects }) => {
  const { t } = useTranslation("projects");

  const searchCriteria: Criterion<SearchParamNames>[] = useMemo(
    () => [
      {
        label: "Report Period From",
        label2: "Report Period To",
        paramName: "targetEndDate",
        type: "dateRange",
      },
      { label: "Project Code", paramName: "projectCode", type: "select", options: ["M1963", "M1235", "M1476"] },
      { label: "Staff Name", paramName: "staffName", type: "select", options: ["Kennith", "Tom", "Cyril"] },
    ],
    [t],
  );

  return (
    <>
      <SearchBox
        criteria={searchCriteria}
        onSearch={(query) => {
          console.log(query);
        }}
      />
      {/* <DownloadReportButton /> */}
    </>
  );
};

export default ProgressByClientSearch;
