import http from '../../index'
import type { PushRecordIdRequest, InvoiceTaxDetailResponse } from './type.d'

export const getConfirmInvoiceInfoApi = (data: PushRecordIdRequest) => {
  return http.get({
    url: '/admin/invoice-order/get-confirm-invoice-info',
    params: data,
  })
}

export const getInvoiceTaxApi = (data: PushRecordIdRequest) => {
  return http.get<InvoiceTaxDetailResponse>({
    url: '/admin/invoice-order/get-invoice-tax',
    params: data,
  })
}

export const getStatusApi = (data: PushRecordIdRequest) => {
  return http.get({
    url: '/admin/invoice-order/get-status',
    params: data,
  })
}

export const submitInvoiceApplyApi = (data: PushRecordIdRequest) => {
  return http.post({
    url: '/admin/invoice-order/submit-invoice-apply',
    data: data,
  })
}

export const invoiceRecordInvalidateApi = (data: PushRecordIdRequest) => {
  return http.post({
    url: '/admin/invoice-record/invalidate-for-h5',
    data: data,
  })
}
