/**
 * Vue Router configuration for Mitgliederverwaltung.
 */
import { createRouter, createWebHashHistory } from 'vue-router'
import MemberList from './views/MemberList.vue'

const routes = [
	{
		path: '/',
		name: 'members',
		component: MemberList,
	},
	{
		path: '/members/:id',
		name: 'member-detail',
		component: () => import('./views/MemberDetail.vue'),
		props: true,
	},
	{
		path: '/families',
		name: 'families',
		component: () => import('./views/FamilyList.vue'),
	},
	{
		path: '/families/:id',
		name: 'family-detail',
		component: () => import('./views/FamilyDetail.vue'),
		props: true,
	},
	{
		path: '/fees',
		name: 'fees',
		component: () => import('./views/FeeOverview.vue'),
	},
	{
		path: '/lager',
		name: 'lager',
		component: () => import('./views/LagerList.vue'),
	},
	{
		path: '/lager/:id',
		name: 'lager-detail',
		component: () => import('./views/LagerDetail.vue'),
		props: true,
	},
	{
		path: '/reports',
		name: 'reports',
		component: () => import('./views/Reports.vue'),
	},
	{
		path: '/injuries',
		name: 'injuries',
		component: () => import('./views/InjuryList.vue'),
	},
	{
		path: '/import',
		name: 'import',
		component: () => import('./views/Import.vue'),
	},
	{
		path: '/queries',
		name: 'queries',
		component: () => import('./views/QueryBuilder.vue'),
	},
	{
		path: '/audit-log',
		name: 'audit-log',
		component: () => import('./views/AuditLog.vue'),
	},
	{
		path: '/settings',
		name: 'settings',
		component: () => import('./views/Settings.vue'),
	},
	{
		path: '/backup',
		name: 'backup',
		component: () => import('./views/Backup.vue'),
	},
	{
		path: '/inventory',
		name: 'inventory',
		component: () => import('./views/Inventory.vue'),
	},
]

const router = createRouter({
	history: createWebHashHistory(),
	routes,
})

export default router
