
import api from '@/store/modules/api.js'

// #ifndef VUE3
import Vue from 'vue'
import Vuex from 'vuex'
import persistedState from "vuex-persistedstate"
Vue.use(Vuex)
const store = new Vuex.Store({
	plugins: [
		persistedState({
			storage: {
				getItem: key => uni.getStorageSync(key),
				setItem: (key, value) => uni.setStorageSync(key, value),
				removeItem: key => uni.removeStorageSync(key)
			}
		})
	],
	modules: {
		api,
	},
	getters: {

	},
	strict: true
})
// #endif

// #ifdef VUE3
import {
	createStore
} from 'vuex'
const store = createStore({
	state: {

	},
	modules: {
		api,
	},
	getters: {},
})
// #endif
export default store
