// import { ApprovalRecordsDto } from "@/dto/approval/approvalRecordsDto";
// import { UserRecordDto } from "@/dto/userRecords/userRecordsDto";
// import { SharePointService } from "@/serivces/sharepoint/spService";

// const approvalService = new SharePointService("User_Records_Associated_Task");
// const userRecordsService = new SharePointService("User_Records");

// export const fetchApprovalTasks = async (): Promise<ApprovalRecordsDto[]> => {
//   try {
//     return await approvalService.renderListData(
//       "AssignedTo",
//       "",
//       "<FieldRef Name='ID' /> <FieldRef Name='Title' /> <FieldRef Name='AssignedTo' /> <FieldRef Name='Created' /> <FieldRef Name='TaskStatus' />"
//     );
//   } catch (error) {
//     console.error("Error fetching approval records:", error);
//     return [];
//   }
// };

// export const fetchParentRecordDetails = async (id: number) => {
//   const response: UserRecordDto[] = await userRecordsService.renderListData(
//     null,
//     `<And><Eq><FieldRef Name='Is_Deleted' /><Value Type='Integer'>0</Value></Eq><Eq><FieldRef Name='ID' /><Value Type='Integer'>${id}</Value></Eq></And>`
//   );
//   return response[0];
// };
