import Vue from 'vue'
import Vuex from 'vuex'
import user from './modules/user'
import permission from './modules/permission'
import app from './modules/app'
import getters from './getters'


Vue.use(Vuex)
    // export default function( /* { ssrContext } */ ) {
    //     const Store = new Vuex.Store({
    //         modules: {
    //             // example
    //             user,
    //             permission
    //         },
    //         getters,
    //         // enable strict mode (adds overhead!)
    //         // for dev mode only

//     })

//     return Store
// }
const store = new Vuex.Store({
    modules: {
        user,
        permission,
        app
    },
    getters,
    strict: process.env.DEV
})

export default store