import Table from "./TablePage";
import SearchField from "../../../../../Components/DataTable/SearchField";
import { useLocation, useNavigate } from "react-router-dom";
import CustomSelect from "./Select/CustomSelect";
import EditHomeWorkModel from "./Model/EditModel";
import AddHomeWorkModel from "./Model/AddModel";
import DeleteHomeWorkModel from "./Model/Delete";

import type { DatePickerProps } from "antd";
import { DatePicker } from "antd";
import dayjs from "dayjs";
import { useObjectToEdit } from "../../../../../zustand/ObjectToEditState";
import { notes } from "../../../../../types/App";
import { useTranslation } from "react-i18next";
import { translateOptions } from "../../../../../utils/translatedOptions";
import CustomDatePicker from "../../../../../Components/Ui/Custom/CustomDatePicker";

const TableHeader = () => {

  const [t] = useTranslation();
  const translateArray = translateOptions(
    [...notes, { label: t("select.Note.all_note"), value: "" }],
    t,
  );

  return (
    <div className="TableWithHeader">
      <header>
        <h6> {t("header.classroom_behavior_of_students")}</h6>

        <div className="Selects">
          <CustomSelect
            options={translateArray}
            placeholder={t("select.Note.all_note")}
            searchBy="type"
          />
       <CustomDatePicker/>
        </div>
      </header>
      <SearchField
        searchBy="student_name_note"
        placeholder={t("practical.search_here")}
      />

      <Table />

      <AddHomeWorkModel />
      <EditHomeWorkModel />
      <DeleteHomeWorkModel />
    </div>
  );
};

export default TableHeader;
