import http from '@/http/api.js'

/**
 * 主题取号列表
 * @param {*} params
 * @returns
 */
export const getThemeList = params => {
	return http.request({
		url: 'api/blade-subject/subject/list',
		method: 'GET',
		params: {
			...params
		},
	});
};

/**
 * 事项列表
 * @param {*} params
 * @returns
 */
export const getBusinessList = params => {
	return http.request({
		url: 'api/blade-item/list',
		method: 'GET',
		params: {
			...params
		},
	});
};

/**
 * 历史取号列表
 * @param {*} params
 * @returns
 */
export const getHistoryList = params => {
	return http.request({
		url: 'api/blade-queuerecord/queueRecord/history',
		method: 'GET',
		params: {
			...params
		},
	});
};

/**
 * 取号
 * @param {*} data { applicantName, applicantIdCard, itemId, windowId }
 * @returns
 */
export const takeNumber = data => {
	return http.request({
		url: 'api/blade-queuerecord/queueRecord/take-number',
		method: 'POST',
		data
	});
};