import request from "@/api/request.js";
// 全领域

// 全领域统计
export function getAllDomainCount() {
	return request({
		method: "GET",
		url: `/api/rivalryIndexV2/AllDomainCount`
	});
}

// 美对华制裁措施数量趋势
export function getDomainContainmentTrend(byYOrM = "按月统计") {
	return request({
		method: "GET",
		url: `/api/rivalryIndexV2/DomainContainmentTrend?byYOrM=${byYOrM}`
	});
}

// 中美科技博弈分析
export function getTechnologyGameAnalysis(domain = 1) {
	return request({
		method: "GET",
		url: `/api/rivalryIndexV2/TechnologyGameAnalysis?domain=${domain}`
	});
}

// 领域打压遏制排行
/**
 * @param {currentPage, pageSize}
 */
export function getDomainContainmentRanking(ContainmentOrg = "对我打压机构", Domains = "") {
	return request({
		method: "GET",
		url: !!Domains
			? `/api/rivalryIndexV2/DomainContainmentRanking?ContainmentOrg=${ContainmentOrg}&Domains=${Domains}`
			: `/api/rivalryIndexV2/DomainContainmentRanking?ContainmentOrg=${ContainmentOrg}`
	});
}

// 领域打压遏制时间线
/**
 * @param {currentPage, pageSize}
 */
export function getDomainContainmentTimeline(params) {
	return request({
		method: "GET",
		url: `/api/rivalryIndexV2/DomainContainmentTimeline`,
		params
	});
}
