import * as L from '../../utils/localStorageKeys'
import * as actions from './actions'
import getters from './getters'
import mutations from './mutations'

const state = {
  esacProductSearchPaginationSize: 10,
  esacVoucherListPaginationSize: 10,
  esacVoucherListTotalRows: 0,
  esacVoucherListSearchText: localStorage.getItem(L.ESAC_VOUCHER_SEARCH_TEXT) || '',
  esacRouterData: {
    currentStep: 'SelectVoucher',
    preventReloadVoucher: 0,
  },
  esacRedemptionData: {
    voucherData: [],
    productCategoryData: [],
    productData: [],
    productSearchVisible: false,
    shippingData: {},
    saleCreationData: {},
    saleData: {},
    paymentData: {},
    paymentSaleId: null,
    completedSaleId: null,
  },
  esacCwScheduleData: null,
  esacActiveCountryData: null,
  esacCountryRelationData: {
    entity: {
      locations: [],
    },
  },
  esacTransactionLocationId: null,
  esacStockLocationId: null,
  esacAddressFormatData: null,
  esacMemberData: null,
  esacStateCityData: null,
  esacLocationAddressData: null,
  esacPaymentModeSettingData: null,
  esacDownloadInvoiceData: null,
}

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