import Vue from 'vue'
import Vuex from 'vuex'
// import types from './mutation-types'
import * as getters from './getters'
// import * as actions from './actions'
import mutations from './mutations'

// Modules
import schedules from './modules/schedules'
import djPlayer from './modules/dj-player'
import announces from './modules/announces'
import downloads from './modules/downloads'
import settings from './modules/settings'
import streaming from './modules/streaming'
import bluetooth from './modules/bluetooth'

Vue.use(Vuex)

const state = {
  config: {
    version: 0,
    hasBluetooth: false,
    hasDj: '0',
    bluetoothAutoConnectMac: '',
    hasVolumeControl: 0
  },
  connected: true,
  itsPrayerTime: false,
  masterVolume: 0
}

const store = new Vuex.Store({
  state,
  getters,
  // actions,
  mutations,
  modules: {
    schedules: schedules,
    djPlayer: djPlayer,
    announces: announces,
    downloads: downloads,
    settings: settings,
    streaming: streaming,
    bluetooth: bluetooth
  }
})

export default store
