import validatedRouteMixin from '@/app/_global/mixins/validatedRouteMixin'
import {
  CREATE_SV_TRANSFER as URL_PREFIX,
  CREATE_SV_TRANSFER_CONFIRMATION,
  CREATE_SELECT_SV_TRANSFER_PRODUCTS,
} from '@/config/url-prefix'
import { mapGetters } from 'vuex'

export default {
  mixins: [validatedRouteMixin],
  data() {
    let self = this

    return {
      routingOrder: [
        {
          id: 1,
          path: [URL_PREFIX, CREATE_SELECT_SV_TRANSFER_PRODUCTS].join('/'),
          previous: this.$t('Common.Cancel'), // text for previous step
          next: this.$t('Common.Next'), // text for next step
          validate: () => (self.getSvTransferDetails.items || []).length > 0,
        },
        {
          id: 2,
          path: [URL_PREFIX, CREATE_SV_TRANSFER_CONFIRMATION].join('/'),
          previous: this.$t('Common.Back'), // text for previous step
          next: this.$t('Form.Submit'), // text for next step
          complete: true,
        },
      ],
    }
  },
  computed: {
    ...mapGetters(['getSvTransferDetails']),
  },
}
