/**
 * 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: "",
        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"),
      },
    ],
  },
];

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";
