import { apiRequest } from './api.js'

export function recognizeOcrFiles(files, options = {}) {
  const formData = new FormData()
  for (const file of files) {
    formData.append('files', file)
  }

  return apiRequest('/ocr/recognize', {
    method: 'POST',
    body: formData,
    contentType: null,
    ...options
  })
}
