import { requestClient } from '#/api/request';

/** VIP 等级配置 API，路由前缀 vip-level/ */
const prefix = 'vip-level/';

export async function getVipLevelList(data: any) {
  return requestClient.get<any>(`${prefix}list`, { params: data });
}

export async function getVipLevelOption(data?: any) {
  return requestClient.get<any>(`${prefix}option`, { params: data });
}

export async function getVipLevelInfo(id: number) {
  return requestClient.get<any>(`${prefix}detail`, { params: { id } });
}

export async function createVipLevel(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}create`, data);
}

export async function updateVipLevel(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}update`, data);
}

export async function deleteVipLevel(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}delete`, data);
}
