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

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

  const searchCriteria: Criterion<SearchParamNames>[] = useMemo(
    () => [
      // { label: "Team", paramName: "team", type: "text" },
      // { label: "Client", paramName: "client", type: "text" },
      {
        label: "Report Period From",
        label2: "Report Period To",
        paramName: "targetEndDate",
        type: "dateRange",
      },
    ],
    [t],
  );

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

export default ProgressByClientSearch;
