import { createRouter, createWebHistory } from 'vue-router';
import Home from '../views/Home.vue';
import Admin from '../views/Admin.vue';
import Preview from '../views/Preview.vue';

const routes = [
  { path: '/', component: Home },
  { path: '/admin', component: Admin },
  { path: '/preview/:id', component: Preview, props: true }
];

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

export default router;
