import { RouterView } from "vue-router";
import { createRouter, createWebHashHistory } from "vue-router";
import Calendar from "./components/pages/Calendar.vue";
import Clients from "./components/pages/Clients.vue";
import Jobs from "./components/pages/Jobs.vue";
import Invoices from "./components/pages/Invoices.vue";
import Estimates from "./components/pages/Estimates.vue";
import Routes from "./components/pages/Routes.vue";
import TimeSheets from "./components/pages/TimeSheets.vue";
import Warranties from "./components/pages/Warranties.vue";
import Home from "./components/pages/Home.vue";
import Client from "./components/pages/Client.vue";
import Property from "./components/pages/Property.vue";
import Estimate from "./components/pages/Estimate.vue";
import Job from "./components/pages/Job.vue";
import Tasks from "./components/pages/Tasks.vue";

const routes = [
	{
		path: "/",
		component: Home,
	},
	{ path: "/calendar", component: Calendar },
	{ path: "/clients", component: Clients },
	{ path: "/client", component: Client },
	{ path: "/property", component: Property },
	{ path: "/jobs", component: Jobs },
	{ path: "/job", component: Job },
	{ path: "/tasks", component: Tasks },
	{ path: "/invoices", component: Invoices },
	{ path: "/estimates", component: Estimates },
	{ path: "/estimate", component: Estimate },
	{ path: "/routes", component: Routes },
	{ path: "/timesheets", component: TimeSheets },
	{ path: "/warranties", component: Warranties },
	{ path: "/:pathMatch(.*)*", component: Home }, // Fallback to Home for unknown routes
];

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

export default router;
