import api from "./client";

export const FormsSheetApi = {
  get(formId, sheetName, params) {
    return api
      .get(`/form/${formId}/sheet/${sheetName}`, params)
      .then((r) => r.data);
  },
  export(formId, sheetName, params = {}) {
    return api.get(`export/form/${formId}/sheet/${sheetName}`, {
      params,
      responseType: "blob",
    });
  },
  getExpenseItem(itemId) {
    return api.get(`/expense-item/${itemId}`).then((r) => r.data);
  },
};
