import Papa from "papaparse";

export const loadCSV = async (filePath: string): Promise<string[][]> => {
  const response = await fetch(filePath);
  const csvText = await response.text();
  const result = Papa.parse<string[]>(csvText, { skipEmptyLines: true });
  return result.data;
};
