import {
  REDEEM_I_TOKEN as URL_PREFIX,
  REDEEM_I_TOKEN_SELECT_PRODUCT,
  REDEEM_I_TOKEN_SHIPPING_INFO,
  REDEEM_I_TOKEN_PAYMENT_INFO,
  REDEEM_I_TOKEN_COMPLETE,
} from '@/config/url-prefix'

export default [
  {
    path: URL_PREFIX + '/:voucherId',
    name: 'iTokenRedemptionProcessStart',
    component: () => import('./templates/ITokenRedemptionProcessTemplate'),
    redirect: { name: 'iTokenRedeemProduct' },
    props: true,
    meta: {
      screen: 'i-token-redemption-screen',
      policy: {
        itoken: 'update',
      },
    },
    children: [
      {
        path: REDEEM_I_TOKEN_SELECT_PRODUCT,
        name: 'iTokenRedeemProduct',
        component: () => import('./stepper/ITokenRedemptionSelectProductStep'),
      },
      {
        path: REDEEM_I_TOKEN_SHIPPING_INFO,
        name: 'iTokenRedeemShipping',
        component: () => import('./stepper/ITokenRedemptionShippingInfoStep'),
      },
      {
        path: REDEEM_I_TOKEN_PAYMENT_INFO,
        name: 'iTokenRedeemPayment',
        component: () => import('./stepper/iTokenRedemptionPaymentStep'),
      },
      {
        path: REDEEM_I_TOKEN_COMPLETE,
        name: 'iTokenRedeemCompletion',
        component: () => import('./stepper/ITokenRedemptionCompletionStep'),
        meta: {
          showStepper: false,
        },
      },
    ],
  },
]
