import type { AxiosResponse } from 'axios'
import type { Result } from '@cacp/ui'
import type { Custom } from '@/types/user'
import http from '@/utils/http'
import config from '@/config'

const contextPath = '/customs'
// 关区翻译
export async function queryCustom(query: Array<string>): Promise<Result<Array<Custom>>> {
  const res: AxiosResponse<Result<Array<Custom>>> = await http.post(
    `${config.CACP_DEMO_API}${contextPath}/query-customs`,
    query
  )
  return res.data
}
