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

const prefix = 'transfer-prescription/';

export async function getSalespersonTransferListApi(params: Record<string, any>) {
  return requestClient.get<any>(`${prefix}salesperson-list`, { params });
}

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

export async function getSalespersonTransferByRegisterApi(registerId: number) {
  return requestClient.get<any>(`${prefix}get-salesperson-by-register`, {
    params: { register_id: registerId },
  });
}

export async function markSalespersonTransferImportedApi(
  id: number,
  registerId: number,
) {
  return requestClient.post<any>(`${prefix}mark-salesperson-imported`, {
    id,
    register_id: registerId,
  });
}
