import { PostData, GetData, GetURL } from '../helpers'
import url from '../url'

export const getDropFunction = async (body) =>
    GetData(url.dropdownFuntions, body)
        .then((res) => res)
        .catch((err) => null)
export const dropdownPermission = async (body) =>
    GetData(url.dropdownPermission, body)
        .then((res) => res)
        .catch((err) => null)

export const getDropBlogCategory = async (body) =>
    GetData(url.dropdownBlogCategory, body)
        .then((res) => res)
        .catch((err) => null)

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

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

export const getDropDownGroup = async (body) =>
    GetData(url.dropdownUserGroup, body)
        .then((res) => res)
        .catch((err) => null)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

export const dropdownStoreNew = async (id) =>
    GetData(`${url.dropdownStore}`, {})
        .then((res) => res)
        .catch((err) => null)

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