import { requestClient } from '#/api/request';
const prefix = 'withdrawal-application/';
/**
 * 分页查询用户列表
 * @param data
 */
export async function getWithdrawalApplicationList(data: any) {
  return requestClient.get<any>(`${prefix}list`, { params: data });
}

/**
 * 获取提现记录详情
 * @param id
 */
export async function getWithdrawalApplicationInfo(id: number) {
  return requestClient.get<any>(`${prefix}detail`, { params: { id } });
}

/**
 * 新增提现记录
 * @param data
 */
export async function createWithdrawalApplicationWithdrawal(
  data: Record<string, any>,
) {
  return requestClient.post<any>(`${prefix}withdrawal`, data);
}

/**
 * 新增提现记录
 * @param data
 */
export async function createWithdrawalApplication(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}create`, data);
}

/**
 * 编辑提现记录
 * @param data
 */
export async function updateWithdrawalApplication(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}update`, data);
}

/**
 * 删除提现记录
 * @param data
 */
export async function deleteWithdrawalApplication(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}delete`, data);
}

/**
 * 删除提现记录
 * @param id
 */
export async function resetPassword(id: number) {
  return requestClient.post<any>(`${prefix}reset-password`, {
    id,
  });
}
