"use server";

import { serverFetchJson } from "@/app/utils/fetchUtil";
import { BASE_API_URL } from "@/config/api";
import { Dayjs } from "dayjs";
import { cache } from "react";    


export interface ResourceSummaryDetailsResult {
  summaryInformation: any[];
  summaryMainStage: any[];
  summarySubStage: any[];
}

export const fetchResourceSummaryDetailResult = cache(async (projectId: number) => {
    return serverFetchJson<ResourceSummaryDetailsResult[]>(
      `${BASE_API_URL}/dashboard/searchProjectResourcesSummaryDetails?projectId=${projectId}`
    )
});
