import {createRouter, createWebHistory} from 'vue-router';
import Calculations from "@/pages/Calculations.vue";
import Reporting from "@/pages/Reporting.vue";
import Config from "@/pages/Config.vue";
import CalculationSingleEdit from "@/pages/CalculationSingleEdit.vue";
import CalculationMassEdit from "@/pages/CalculationMassEdit.vue";
import CalculationAssistant from "@/pages/CalculationAssistant.vue";

const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: '/',
            redirect: '/calculations',
            name: 'calculation-list',

        },
        {
            path: '/assistant',
            component: CalculationAssistant,
            name: 'assistant',
        },
        {
            path: '/calculations',
            component: Calculations,
            name: 'home',
        },
        {
            path: '/edit/:id',
            component: CalculationSingleEdit,
            name: 'edit',
        },
        {
            path: '/bulk/:ids',
            component: CalculationMassEdit,
            name: 'bulk',
        },
        {
            path: '/bulk/:ids/edit/:id',
            component: CalculationSingleEdit,
            name: 'bulk-single-edit',
        },
        {
            path: '/reports',
            component: Reporting,
        },
        {
            path: '/config',
            component: Config
        },
        {
            path: '/:pathMatch(.*)*',
            redirect: '/calculations'
        }
    ]
})


export default router;