// 综合搜索
const ComprehensiveSearch = () => import("@/views/comprehensiveSearch/index.vue");
const SearchResults = () => import("@/views/comprehensiveSearch/searchResults/index.vue");
const Chat = () => import("@/views/comprehensiveSearch/chat/index.vue");

const comprehensiveSearchRoutes = [
	// 综合搜索
	{
		path: "/comprehensiveSearch",
		name: "comprehensiveSearch",
		component: ComprehensiveSearch,
		meta: {
			title: "搜索-科技安全"
		}
	},
	{
		path: "/searchResults",
		name: "searchResults",
		component: SearchResults,
		meta: {
			title: "搜索结果",
			dynamicTitle: true
		}
	},
	{
		path: "/chat",
		name: "chat",
		component: Chat,
		meta: {
			title: "智能问答"
		}
	}
];

import { useGotoPage } from "../common.js";

export function useGotoComprehensiveSearch() {
	const gotoPage = useGotoPage();
	return (isNewTabs = true) => gotoPage("/comprehensiveSearch/", {}, isNewTabs);
}
export function useGotoSearchResults() {
	const gotoPage = useGotoPage();
  
	return (searchText, areaName, isNewTabs = true) => gotoPage("/searchResults/", { searchText, areaName }, isNewTabs);
}

export default comprehensiveSearchRoutes;
