import { cache } from "react";

export interface CashFlow {
  id: number;
  projectCode: string;
  projectName: string;
  team: string;
  teamLeader: string;
  startDate: string;
  startDateFrom: string;
  startDateTo: string;
  targetEndDate: string;
  client: string;
  subsidiary: string;
}

export const preloadProjects = () => {
  fetchProjectsCashFlow();
};

export const fetchProjectsCashFlow = cache(async () => {
  return mockProjects;
});

const mockProjects: CashFlow[] = [
  {
    id: 1,
    projectCode: "CUST-001",
    projectName: "Client A",
    team: "N/A",
    teamLeader: "N/A",
    startDate: "5",
    startDateFrom: "5",
    startDateTo: "5",
    targetEndDate: "s",
    client: "ss",
    subsidiary: "ss",
  },
];
