// import * as React from "react";
// import { useTranslation } from "react-i18next";
// import { useNavigate } from "react-router-dom";
// import { Search, MoveLeft } from "lucide-react";

// import { useUserRecords } from "../hooks/useUserRecords";
// import { SoftDeleteColumns } from "./softDeleteColumns";
// import Loader from "../../components/Loader/loader";

// import {
//   Select,
//   SelectTrigger,
//   SelectContent,
//   SelectItem,
//   SelectValue,
// } from "@/shared/common/ui/select";
// import { Input } from "@/shared/common/ui/input";
// import { Button } from "@/shared/common/ui/button";
// import { AdvancedTable } from "@/shared/common/ui/table/AdvancedTable";
// import { useAuthUser } from "@/shared/hooks/useAuthUser";
// import { useState } from "react";
// import DelegationView from "@/record-management/common/DelegationView";
// import i18n from "@/i18n";
// import EthiopianDatePickerModal, {
//   convertEthiopianToGregorian,
// } from "@/shared/common/form/fields/AmharicDatePicker";
// const SoftDelete = () => {
//   const { t } = useTranslation();
//   const navigate = useNavigate();
//   const [pageIndex, setPageIndex] = React.useState(0);
//   const pageSize = 10;
//   const { userDetails } = useAuthUser();
//   const isDelegated = userDetails?.employee?.some((emp) =>
//     emp.positions.some((pos) => pos.hasDelegated)
//   );
//   const [searchQuery, setSearchQuery] = React.useState("");
//   const [showFromPicker, setShowFromPicker] = useState(false);
//   const [showToPicker, setShowToPicker] = useState(false);
//   const [filterType, setFilterType] = React.useState<
//     "subject" | "Date" | "letterName"
//   >("subject");
//   const [fromDate, setFromDate] = React.useState<string>("");
//   const [toDate, setToDate] = React.useState<string>("");
//   const [fromDateDisplay, setFromDateDisplay] = React.useState<string>("");
//   const [toDateDisplay, setToDateDisplay] = React.useState<string>("");
//   const lang = i18n.language;
//   const filterParams = React.useMemo(() => {
//     const baseParams = {
//       skip: pageIndex * pageSize,
//       take: pageSize,
//       orderBy: "deletedAt:DESC",
//       subject: filterType === "subject" ? searchQuery.trim() : "",
//       fromDeletedAt: filterType === "Date" && fromDate ? fromDate : "",
//       toDeletedAt: filterType === "Date" && toDate ? toDate : "",
//       letterName: filterType === "letterName" ? searchQuery.trim() : "",
//     };

//     return Object.fromEntries(
//       Object.entries(baseParams).filter(([, v]) => v !== "")
//     );
//   }, [pageIndex, filterType, searchQuery, fromDate, toDate]);
//   const {
//     recordsResponse,
//     isLoading,
//     isError,
//     refetch,
//     recordParent,
//     recordParentCount,
//     refetchParent,
//     isLoadingParent,
//     isErrorParent,
//   } = useUserRecords(filterParams);
//   let Error, loading;
//   return isDelegated ? (
//     <DelegationView />
//   ) : (
//     <div className="flex flex-col gap-2 bg-background text-foreground">
//       {/* Header and Filter */}
//       <div className="flex">
//         <Button
//           size="sm" // or use className for custom sizing
//           className="bg-gray-600 text-sm px-1 py-1 w-[100px] hover:bg-gray-700"
//           onClick={() => navigate(-1)}
//         >
//           <MoveLeft className="w-4 h-4" />
//           {t("common.back")}
//         </Button>
//       </div>

//       <div className="flex items-center justify-between flex-wrap gap-4 mb-4">
//         <h4 className="text-xl font-medium text-gray-900 dark:text-gray-100">
//           {t("msg.recycleBin")}
//         </h4>
//         <div className="flex flex-col sm:flex-row items-start sm:items-center gap-2 w-full sm:w-auto">
//           <Select
//             value={filterType}
//             onValueChange={(val) => {
//               setFilterType(val as "subject" | "Date" | "letterName");
//               setSearchQuery("");
//               setFromDate("");
//               setToDate("");
//             }}
//           >
//             <SelectTrigger className="w-full sm:w-[200px]">
//               <SelectValue placeholder={t("userRecord.Filter by")} />
//             </SelectTrigger>
//             <SelectContent>
//               <SelectItem value="subject">{t("userRecord.Subject")}</SelectItem>
//               <SelectItem value="Date">{t("userRecord.Date")}</SelectItem>
//               <SelectItem value="letterName">
//                 {t("viewDetail.fileName")}
//               </SelectItem>
//             </SelectContent>
//           </Select>

//           {filterType === "Date" ? (
//             <div className="flex flex-col sm:flex-row gap-2">
//               {lang.startsWith("en") ? (
//                 <>
//                   <label className="mt-2">From: </label>
//                   <Input
//                     type="date"
//                     value={fromDate}
//                     onChange={(e) => setFromDate(e.target.value)}
//                     className="w-[150px]"
//                   />
//                   <label className="mt-2">To: </label>
//                   <Input
//                     type="date"
//                     value={toDate}
//                     onChange={(e) => setToDate(e.target.value)}
//                     min={fromDate}
//                     className="w-[150px]"
//                   />
//                 </>
//               ) : (
//                 <div className="flex flex-wrap items-center gap-3">
//                   {/* From Date */}
//                   <div className="relative">
//                     <label className="font-medium mr-2">ከ:</label>
//                     <input
//                       type="text"
//                       value={fromDateDisplay}
//                       readOnly
//                       onClick={() => setShowFromPicker((prev) => !prev)}
//                       className="border border-gray-300 dark:border-gray-700 rounded-md px-2 py-1.5 w-40 bg-white dark:bg-gray-800 cursor-pointer"
//                       placeholder="ቀን ይምረጡ"
//                     />
//                     {showFromPicker && (
//                       <div className="absolute z-50 mt-1 bg-white dark:bg-gray-800 shadow-lg rounded-md p-2">
//                         <EthiopianDatePickerModal
//                           value={fromDate}
//                           onChange={(ethiopianDate: string) => {
//                             const gregorianDate =
//                               convertEthiopianToGregorian(ethiopianDate);
//                             const formatted = gregorianDate
//                               .toISOString()
//                               .split("T")[0]; // "YYYY-MM-DD"
//                             setFromDate(formatted);
//                             setFromDateDisplay(ethiopianDate);
//                             setShowFromPicker(false);
//                           }}
//                         />
//                       </div>
//                     )}
//                   </div>

//                   {/* To Date */}
//                   <div className="relative">
//                     <label className="font-medium mr-2">እስከ:</label>
//                     <input
//                       type="text"
//                       value={toDateDisplay}
//                       readOnly
//                       onClick={() => setShowToPicker((prev) => !prev)}
//                       className="border border-gray-300 dark:border-gray-700 rounded-md px-2 py-1.5 w-40 bg-white dark:bg-gray-800 cursor-pointer"
//                       placeholder="ቀን ይምረጡ"
//                     />
//                     {showToPicker && (
//                       <div className="absolute z-50 mt-1 bg-white dark:bg-gray-800 shadow-lg rounded-md p-2">
//                         <EthiopianDatePickerModal
//                           value={fromDate}
//                           onChange={(ethiopianDate: string) => {
//                             const gregorianDate =
//                               convertEthiopianToGregorian(ethiopianDate);
//                             const formatted = gregorianDate
//                               .toISOString()
//                               .split("T")[0]; // "YYYY-MM-DD"
//                             setToDate(formatted);
//                             setToDateDisplay(ethiopianDate);
//                             setShowFromPicker(false);
//                           }}
//                         />
//                       </div>
//                     )}
//                   </div>
//                 </div>
//               )}
//             </div>
//           ) : (
//             <div className="relative w-full sm:w-[200px]">
//               <Input
//                 type="text"
//                 className="pl-8"
//                 placeholder={`${t(
//                   "userRecord.Search"
//                 )} ${filterType.toLowerCase()}`}
//                 value={searchQuery}
//                 onChange={(e) => setSearchQuery(e.target.value)}
//               />
//               <Search className="absolute left-2 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-500" />
//             </div>
//           )}
//         </div>
//       </div>
//       {/* Table */}
//       {loading ? (
//         <Loader />
//       ) : Error ? ( // delegated error first
//         <div className="flex flex-col items-center justify-center h-full p-6 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg">
//           <h2 className="text-xl font-semibold text-red-700 dark:text-red-400">
//             {t("msg.error")}
//           </h2>
//         </div>
//       ) : Error ? ( // normal error
//         <div className="flex flex-col items-center justify-center h-full p-6 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg">
//           <h2 className="text-xl font-semibold text-red-700 dark:text-red-400">
//             {t("msg.error")}
//           </h2>
//         </div>
//       ) : (
//         <AdvancedTable
//           columns={SoftDeleteColumns(refetch)} // ✅ Pass hook result
//           data={recordParent || []}
//           tableName="Soft Delete"
//           toolBarPosition="right"
//           itemCount={recordParentCount || 0}
//           pageIndex={pageIndex}
//           onPageChange={setPageIndex}
//           nextFunction={() => setPageIndex(pageIndex + 1)}
//           prevFunction={() => setPageIndex(Math.max(0, pageIndex - 1))}
//           refresh={refetch}
//         />
//       )}
//     </div>
//   );
// };

// export default SoftDelete;
const SoftDelete = () => {
  return <></>;
};
export default SoftDelete;
