/**
 * Customers feature module (@maestro/core).
 */
import CustomersIndex from "./views/Index.vue";

export const customerRoutes = [
  {
    path: "customers",
    name: "customers",
    meta: {
      module: "customers",
      breadcrumb: ["Klanten"],
      title: "Klanten",
    },
    component: CustomersIndex,
  },
  {
    path: "customers/:id",
    meta: {
      module: "customers",
      breadcrumb: ["Klanten"],
      title: "Klant",
    },
    component: () => import("./views/CustomerShowLayout.vue"),
    children: [
      {
        path: "dashboard",
        name: "customers-show-dashboard",
        meta: {
          module: "customers",
          breadcrumb: ["Klanten", "Dashboard"],
          title: "Klant — dashboard",
        },
        component: () => import("./views/CustomerShowDashboard.vue"),
      },
      {
        path: "",
        name: "customers-show",
        meta: {
          module: "customers",
          breadcrumb: ["Klanten", "Algemeen"],
          title: "Klant",
        },
        component: () => import("./views/CustomerShowGeneral.vue"),
      },
      {
        path: "contacts",
        name: "customers-show-contacts",
        meta: {
          module: "customers",
          breadcrumb: ["Klanten", "Contacten"],
          title: "Contacten",
        },
        component: () => import("./views/CustomerShowContacts.vue"),
      },
      {
        path: "addresses",
        name: "customers-show-addresses",
        meta: {
          module: "customers",
          breadcrumb: ["Klanten", "Adressen"],
          title: "Adressen",
        },
        component: () => import("./views/CustomerShowAddresses.vue"),
      },
      {
        path: "offers",
        name: "customers-show-offers",
        meta: {
          module: "customers",
          breadcrumb: ["Klanten", "Offertes"],
          title: "Offertes",
        },
        component: () => import("./views/CustomerShowOffers.vue"),
      },
    ],
  },
];

export { default as CustomersIndex } from "./views/Index.vue";
export { default as CustomersShowLayout } from "./views/CustomerShowLayout.vue";

export {
  useCustomerList,
  useCustomer,
  useCustomerForm,
  useCustomerContacts,
  useCustomerAddresses,
} from "./composables/useCustomers.js";
