import { createApp } from 'vue';
import './style.css';
import App from './App.vue';
import { createMemoryHistory, createRouter } from "vue-router"

// @ts-ignore
import { createThemeManager } from 'vue-daisyui-theme-manager';
import Home from './views/home.vue';
import Driver from './views/driver.vue';
import Route from './views/route.vue';
import Vehicle from './views/vehicle.vue';
import Settings from './views/settings.vue';

const routes = [
    { path: '/', component: Home },
    { path: '/driver', component: Driver },
    { path: '/driver/:id', component: Driver },
    { path: '/vehicle', component: Vehicle },
    { path: '/vehicle/:id', component: Vehicle },
    { path: '/route', component: Route },
    { path: '/route/:id', component: Route },
    { path: '/route/:from/:to', component: Route },
    { path: '/settings', component: Settings },
]

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

const app = createApp(App);

// Mount the app
app.use(router);
app.mount('#app');