import type { TableInput } from '@core/type/baseTable' import useAxios from '@core/utils/useAxios' // import { Customer } from '@/model/customer' import type { Charge, Wallet, Withdraw, SendWeight } from '@/model/wallet' export const getWalletTable = async (params?: TableInput) => await useAxios.post>('/admin/wallet/table', params) export const chargeWallet = async (params: Charge, type: 'gold' | 'money') => type === 'money' ? await useAxios.post('/admin/wallet/charge', params) : await useAxios.post('/admin/wallet/charge_gold', params) export const getWithdrawTable = async (params: TableInput) => await useAxios.post>('/admin/wallet/withdraw/table', params) export const completeWithdraw = async (params: Withdraw) => await useAxios.post('/admin/wallet/withdraw/complete', params) export const updateSts = async (id: number, sts: Object) => { return await useAxios.put(`/admin/wallet/withdraw/${id}`, sts) } export const getWithdrawById = async (id: number) => { return await useAxios.get(`/admin/wallet/withdraw/${id}`) } export const sendWeights = async (params: SendWeight ) => { return await useAxios.put(`/admin/wallet/transaction/reprice`, params) }