import { api } from "@/lib/api";

export type ImportBatchResponse = {
  id: string;
  drafts: Array<{ id: string; filename: string }>;
};

export function uploadInvoiceFiles(files: File[]): Promise<ImportBatchResponse> {
  const formData = new FormData();
  for (const file of files) {
    formData.append("files", file);
  }
  return api.post<ImportBatchResponse>("/api/v1/invoices/upload", formData);
}
