import versionRoutes from "./routes/version.route";

const routes = [
  {
    path: "/",
    component: () => import("layouts/MainLayout.vue"),
    meta: { requireAuth: true },
    children: [
      {
        path: "",
        redirect: { name: "DashboardPage" },
      },
    ],
  },

  {
    path: "/dashboard",
    component: () => import("layouts/MainLayout.vue"),
    children: [
      {
        path: "",
        name: "DashboardPage",
        component: () => import("pages/dashboard/DashboardPage.vue"),
        meta: {
          title: "Dashboard do Proprietário",
          requireAuth: true,
          breadcrumbs: [
            {
              name: "DashboardPage",
              title: "Dashboard do Proprietário",
            },
          ],
        },
      },
    ],
  },
  {
    path: "/login",
    component: () => import("layouts/LoginLayout.vue"),
    children: [
      {
        path: "",
        name: "LoginPage",
        component: () => import("pages/LoginPage.vue"),
        meta: {
          title: "Login do Proprietário",
        },
      },
    ],
  },

  ...versionRoutes,

  // Always leave this as last one,
  // but you can also remove it
  {
    path: "/:catchAll(.*)*",
    component: () => import("pages/ErrorNotFound.vue"),
  },
];

export default routes;
