import { mainClient } from '@/api/clients/main'
import type { IApiResponse } from '@/api/types'
import type { IVipItem } from '@/types/vip'

export const vipApi = {
  /**
   * 获取VIP购买配置列表
   */
  getVipBuyConfigList: async () => {
    const res = await mainClient.request<IApiResponse<{ res: IVipItem[] }>>({
      url: 'common/userVip/getVipBuyConfigList',
      method: 'POST'
    })
    return res
  },

  /**
   * 获取图书VIP列表
   */
  getBookVipList: async () => {
    const res = await mainClient.request<IApiResponse<any>>({
      url: 'bookAbroad/ebookvip/getEbookvipBuyConfigList',
      method: 'POST'
    })
    return res
  }
}