/* eslint-disable handle-callback-err */
import { PostData, GetURL } from '../helpers'
import url from '../url'

export const listTransReconciliation = async (body) =>
    PostData(url.listTransReconciliation, body)
        .then((res) => res)
        .catch((err) => null)

export const listSheetReconciliation = async (body) =>
    PostData(url.listSheetReconciliation, body)
        .then((res) => res)
        .catch((err) => null)

export const listProviderSetting = async (body) =>
    PostData(url.listProviderSetting, body)
        .then((res) => res)
        .catch((err) => null)

export const detailProviderSetting = async (id, body) =>
    GetURL(`${url.detailProviderSetting}/${id}`, body)
        .then((res) => res)
        .catch((err) => null)

export const updateProviderSetting = async (body) =>
    PostData(url.updateProviderSetting, body)
        .then((res) => res)
        .catch((err) => null)

export const detailSheetReconciliation = async (id, body) =>
    GetURL(`${url.detailSheetReconciliation}/${id}`, body)
        .then((res) => res)
        .catch((err) => null)

export const updateSheetReconciliation = async (body) =>
    PostData(url.updateSheetReconciliation, body)
        .then((res) => res)
        .catch((err) => null)
