import {createRouter, createWebHistory} from 'vue-router';
import CategoriesList from '@/components/settings/categories/CategoriesList.vue';
import CreateCategoryModal from "@/components/settings/categories/CreateCategoryModal.vue";
import CategoryListItem from "@/components/settings/categories/CategoryListItem.vue"; // Импортируем новый компонент
import BudgetList from "../components/budgets/BudgetList.vue";
import BudgetView from "@/components/budgets/BudgetView.vue";
import SettingsView from "@/components/settings/SettingsView.vue";
import RecurrentList from "@/components/settings/recurrent/RecurrentList.vue";
import TransactionList from "@/components/transactions/TransactionList.vue";

const routes = [

    {path: '/', name: 'Budgets main', component: BudgetList},
    {path: '/budgets', name: 'Budgets', component: BudgetList},
    {path: '/budgets/:id', name: 'BudgetView', component: BudgetView},
    {path: '/transactions/:mode*', name: 'Transaction List', component: TransactionList},
    // {path: '/transactions/create', name: 'Transaction List', component: TransactionList},
    {path: '/settings/', name: 'Settings', component: SettingsView},
    {path: '/settings/categories', name: 'Categories', component: CategoriesList},
    {path: '/settings/recurrents', name: 'Recurrent operations list', component: RecurrentList},
    {path: '/settings/categories/create', name: "Categories Creation", component: CreateCategoryModal},// Добавляем новый маршрут
    {path: '/settings/categories/one', name: "Categories Creation", component: CategoryListItem}// Добавляем новый маршрут
];

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

export default router;
