export const TAB_WORKBENCH = 0
export const TAB_MY = 1
const ROOT = '/subPackages/sub_clinic_salesperson';
export const CLINIC_TAB_ROUTES = [
	'/subPackages/sub_clinic_admin/home/index',
	'/subPackages/sub_clinic_admin/my/index',
]

export function getClinicTabList() {
	return [
		{
			iconPath: 'home',
			selectedIconPath: 'home-fill',
			text: '工作台',
			pagePath: `${ROOT}/home/index`,
		},
		{
			iconPath: 'account',
			selectedIconPath: 'account-fill',
			text: '我的',
			pagePath: `${ROOT}/my/index`,
		},
	]
}

export function switchClinicTab(index) {
	const url = CLINIC_TAB_ROUTES[index]
	if (!url) return
	uni.reLaunch({ url })
}
