import * as actions from './actions'
import getters from './getters'
import mutations from './mutations'

const state = {
  eWalletDetails: {},
  eWalletBalance: 0,
  eWalletActiveStatus: null,
  eWalletId: 0,
  eWalletCurrencyId: '',
  eWalletCurrencyCode: 'MYR', // MYR is for Malay, it will be updated later by API
  eWalletAutoWithdrawalStatus: 0,
  eWalletMobileNumber: 1234567890,
  eWalletSelectedCountryCode: '',
  eWalletUserId: 0,
  eWalletCountryId: null,
  eWalletEmail: null,
  eWalletHistoryDate: {
    from: null,
    to: null,
  },
  eWalletTransactionHistory: [
    // This is just a dummy data for testing the layout
    {
      transactionDate: '',
      transactionDetails: '',
      debit: '',
      credit: '',
      balance: '',
    },
  ],
  eWalletRecordDate: {
    from: null,
    to: null,
  },
  eWalletRecord: [
    {
      transactionDate: '',
      transactionDetails: '',
      toAccount: '',
      amount: '',
      statusReference: '',
    },
  ],
  ewalletFundWithdrawalStep: 'fundWithdrawalFirstStep', // Contains step component name
  ewalletFundStep: 'fundFirstStep', // Contains step component name
  classObject1: {
    'active-step': true,
    'circle-text': true,
  },
  classObject2: {
    'active-step': false,
    'circle-text': true,
  },
  classObject3: {
    'active-step': false,
    'circle-text': true,
  },
  listMobileCountriesCodes: [],
  mobileVerificationStatus: false,
  mobileVerificationMessage: '',
  mobileConfirmationStatus: { client: false, status: false },
  mobileConfirmationMessage: '',
  eWalletFundTransferInfo: {
    amount: '',
    from: '',
    toUserId: '',
    TOI: '',
    TOI2: '',
    recipientEmail: '',
    recRef: '',
  },
  eWalletTransactionTypeId: {
    transfer: 0,
    withdraw: 0,
    purchase: 0,
  },
  eWalletTransactionStatus: {},
  eWalletFundTransferResponseInfo: {
    transactionStatus: '',
    transactionNumber: '',
    transactionDate: '',
    transactionTime: '',
    effectiveDate: '',
  },
  eWalletFundTransferStatus: false,
  eWalletFundTransferMessage: '',
  eWalletFundWithdrawalInfo: {
    amount: '',
    from: '',
    bankName: '',
    accountNo: '',
    accountHolderName: '',
    recipientEmail: '',
    recRef: '',
    cardNumber: '',
    cardHolderName: '',
    expiryDate: { mm: '', yy: '' },
  },
  eWalletInsufficientFundError: false,
  eWalletRangeFundError: false,
  eWalletShowModal: false,
  eWalletShowModalProcessType: null,
  eWalletSelectedPayment: '',
  eWalletSelectedBankInfo: {
    bankName: '',
    bankSwiftCode: '',
    bankAccountNumber: '',
    bankAccountHolderName: '',
  },
  eWalletSelectedMPayInfo: {
    eWalletCardNumber: '',
    eWalletCardHolderName: '',
    eWalletCardExpiryDate: { mm: '', yy: '' },
  },
  eWalletBankInfo: {
    bankId: '',
    bankName: '',
    bankSwiftCode: '',
  },
  eWalletForgotSecurityPinModal: false,
  eWalletSecurityPinInfo: {
    status: false,
    message: null,
  },
  eWalletTabIndex: 0,
  eWalletUserCurrency: null,
  eWalletPaginationSize: 10,
  totalEwalletTransactionRows: 0,
  currentHistoryOffset: 1,
  currentRecordOffset: 0,
  eWalletPaymentType: 'mBankComponent', // mBankComponent & mPayComponent,
  resendCode: false,
  tempMobilePhone: {
    mobile_1_country_code_id: null,
    mobile_1_num: null,
  },
  searchedIboId: [],
  eWalletReprintData: {},
  eWalletActivation0Step: false,
}

export default {
  state,
  actions,
  mutations,
  getters,
}
