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

const prefix = 'transfer-question/';

/**
 * 获取转诊问题列表
 * @param data
 */
export async function getTransferQuestionList(data: any) {
  return requestClient.post<any>(`${prefix}list`, data);
}

/**
 * 获取转诊问题详情
 * @param id
 */
export async function getTransferQuestionInfo(id: number) {
  return requestClient.get<any>(`${prefix}detail`, { params: { id } });
}

/**
 * 新增转诊问题
 * @param data
 */
export async function createTransferQuestion(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}add`, data);
}

/**
 * 更新转诊问题
 * @param data
 */
export async function updateTransferQuestion(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}update`, data);
}

/**
 * 删除转诊问题
 * @param data
 */
export async function deleteTransferQuestion(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}delete`, data);
}

/**
 * 获取转诊助理配置
 */
export async function getTransferAssistantConfig() {
  return requestClient.get<any>('transfer-assistant-config/get-config');
}

/**
 * 更新转诊助理配置
 * @param data
 */
export async function updateTransferAssistantConfig(data: Record<string, any>) {
  return requestClient.post<any>('transfer-assistant-config/update-config', data);
}
