import { createApp } from 'vue';
import App from './App.vue';
import { createRouter, createWebHistory } from 'vue-router'; // Import Vue Router
import 'bootstrap/dist/css/bootstrap.min.css';
import { BootstrapIconsPlugin } from "bootstrap-icons-vue";

// Import components for routing
import LoginPage from './components/LoginPage.vue';
import Dashboard from './components/Dashboard.vue'; // Assuming you have a Dashboard view

// Define routes
const routes = [
  { path: '/Dashboard', 
    name: 'Dashboard', 
    components : {
      default : Dashboard
    } 
  }, // Route to Dashboard
  { path: '/', 
    name: 'LoginPage', 
    components : {
      default : LoginPage
    } 
  }, // Route to Login
  // You can define more routes here
];

// Create router instance
const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
});

// Create Vue app and use router
const app = createApp(App);
app.use(BootstrapIconsPlugin);
app.use(router);
app.mount('#app');