let pendingFiles: File[] = [];

export function setChatbotPendingFiles(files: File[]) {
  pendingFiles = [...files];
}

/** Returns and clears the stored files (consume-once). */
export function takeChatbotPendingFiles(): File[] {
  const files = [...pendingFiles];
  pendingFiles = [];
  return files;
}
