import {
  AUTOSHIP as URL_PREFIX,
  AUTOSHIP_SELECT_PRODUCT,
  AUTOSHIP_PAYMENT_INFO,
  AUTOSHIP_SHIPPING_INFO,
  AUTOSHIP_SUMMARY,
  AUTOSHIP_SELECT_SIZES,
} from '@/config/url-prefix'

export default [
  {
    path: URL_PREFIX,
    component: () => import('./templates/AutoshipTemplate'),
    name: 'CreateAutoship',
    redirect: { name: 'AutoshipSelectProduct', params: { page: 1 } },
    meta: {
      screen: 'Autoship',
    },
    children: [
      {
        path: AUTOSHIP_SELECT_PRODUCT + '/:page',
        component: () => import('./stepper/SelectProduct'),
        name: 'AutoshipSelectProduct',
        meta: {
          title: 'Autoship.CreateAutoship',
          showFooter: false,
          showCard: false,
        },
        props: {
          default: true,
          page: 1,
        },
      },
      {
        path: AUTOSHIP_SELECT_SIZES,
        component: () => import('./stepper/SelectSize'),
        name: 'AutoshipSelectSize',
        meta: {
          title: 'Autoship.CreateAutoship',
        },
      },
      {
        path: AUTOSHIP_PAYMENT_INFO,
        component: () => import('./stepper/Payment'),
        name: 'AutoshipPayment',
        meta: {
          title: 'Autoship.CreateAutoship',
        },
      },
      {
        path: AUTOSHIP_SHIPPING_INFO,
        component: () => import('./stepper/Shipping'),
        name: 'AutoshipShipping',
        meta: {
          title: 'Autoship.CreateAutoship',
        },
      },
      {
        path: AUTOSHIP_SUMMARY,
        component: () => import('./stepper/Summary'),
        name: 'AutoshipSummary',
        meta: {
          title: 'Autoship.CreateAutoship',
        },
      },
    ],
  },
]
