import Http from "../utils/http";
import { host } from "../utils/constant";

const indexHttp = new Http(host);

export function fetchContact() {
  return indexHttp.get("/common/contact");
}

export function fetchCommonQuestions() {
  return indexHttp.get("/qa");
}

export function applyInvoice(startChargeSeqs: string[]) {
  return indexHttp.post("/invoice/applyInvoice", {
    data: {
      startChargeSeqs,
    },
  });
}

export function fetchHomeBanner() {
  return indexHttp.get("/banner");
}

export function fetchInvoiceList() {
  return indexHttp.get("/invoice/list?status=1");
}

export function cancelApplyInvoice() {
  return indexHttp.get("/invoice/cancelApplyInvoice");
}

export function fetchInvoicePDF(invoiceId: string) {
  return indexHttp.get(`/invoice/downloadInvoice/${invoiceId}`);
}
