type TranslateFn = (key: string, params?: Record<string, string | number>) => string

export interface SidebarMainMenuItem {
	path: string
	icon: string
	label: string
	badge?: string
}

export interface SidebarBottomRouteItem {
	type: 'route'
	path: string
	icon: string
	label: string
}

export interface SidebarBottomActionItem {
	type: 'action'
	action: 'template' | 'settings'
	icon: string
	label: string
	activeKey?: string
	settingsName?: 'help' | 'settings'
	showChevron?: boolean
}

export type SidebarBottomMenuItem = SidebarBottomRouteItem | SidebarBottomActionItem

export const getSidebarMainMenu = (t: TranslateFn): SidebarMainMenuItem[] => [
	{
		path: '/',
		icon: 'home',
		label: t('sidebar.menu.overview')
	},
	{
		path: '/workflow',
		icon: 'workflow',
		label: t('sidebar.menu.orchestration')
	},
	{
		path: '/agent',
		icon: 'platForm',
		label: t('sidebar.menu.management')
	},
	{
		path: '/knowledge',
		icon: 'book',
		label: t('sidebar.menu.knowledge')
	},
	{
		path: '/execution',
		icon: 'play',
		label: t('sidebar.menu.execution')
	},
	{
		path: '/chat',
		icon: 'chatMessage',
		label: t('sidebar.menu.chat'),
		badge: 'beta'
	}
]

export const getSidebarBottomMenu = (t: TranslateFn): SidebarBottomMenuItem[] => [
	{
		type: 'route',
		path: '/ollama',
		icon: 'ollama',
		label: t('sidebar.menu.ollama')
	},
	{
		type: 'route',
		path: '/models',
		icon: 'model',
		label: t('sidebar.menu.models')
	},
	{
		type: 'route',
		path: '/web-search',
		icon: 'websearch',
		label: t('sidebar.menu.webSearch')
	},
	{
		type: 'route',
		path: '/storage',
		icon: 'storage',
		label: t('sidebar.menu.storage')
	},
	{
		type: 'route',
		path: '/mcp',
		icon: 'mcp',
		label: t('sidebar.menu.mcp')
	},
	{
		type: 'route',
		path: '/prompts',
		icon: 'prompts',
		label: t('sidebar.menu.prompts')
	},
	{
		type: 'route',
		path: '/skills',
		icon: 'skills',
		label: t('sidebar.menu.skills')
	},
	{
		type: 'action',
		action: 'template',
		icon: 'box',
		label: t('sidebar.menu.templates'),
		activeKey: 'template'
	},
	{
		type: 'route',
		path: '/statistics',
		icon: 'line',
		label: t('sidebar.menu.statistics')
	},
	{
		type: 'action',
		action: 'settings',
		icon: 'help',
		label: t('sidebar.menu.help'),
		settingsName: 'help',
		showChevron: true
	},
	{
		type: 'action',
		action: 'settings',
		icon: 'setting',
		label: t('sidebar.menu.settings'),
		settingsName: 'settings',
		showChevron: true
	}
]
