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

export function createLinkedReimbursementDraftJob(payload = {}) {
  return apiRequest('/reimbursements/linked-reimbursement-draft-jobs', {
    method: 'POST',
    body: JSON.stringify(payload)
  })
}

export function fetchLinkedReimbursementDraftJob(jobId) {
  const normalizedJobId = encodeURIComponent(String(jobId || '').trim())
  return apiRequest(`/reimbursements/linked-reimbursement-draft-jobs/${normalizedJobId}`)
}
