import { MY_BUNDLE as URL_PREFIX, MY_BUNDLE_LISTING, MY_BUNDLE_DETAILS } from '@/config/url-prefix'

export default [
  {
    path: URL_PREFIX,
    component: () => import('@/elements/templates/screens/SidebarFluid'),
    name: 'MyBundle',
    redirect: { name: 'MyBundleListingPaginated', params: { page: 1 } },
    meta: {
      dashboardMenu: {
        displayName: 'MyBundle.Title', // this is the sidebar title
        priority: 7,
        icon: 'sidebar-my-bundle',
      },
      policy: {
        'my-bundle': 'view',
      },
    },
    children: [
      {
        path: MY_BUNDLE_LISTING + '/:page',
        name: 'MyBundleListingPaginated',
        component: () => import('./bundle-listing/components/BundleListing'),
        props: {
          default: true,
          page: 1,
        },
        meta: {
          title: 'MyBundle.Title',
        },
      },
      {
        path: MY_BUNDLE_DETAILS + '/:bundleId',
        name: 'MyBundleDetails',
        component: () => import('./bundle-details/components/BundleDetails'),
        props: true,
        meta: {
          title: 'MyBundle.Details.Title',
        },
      },
    ],
  },
]
