import { createStore, createLogger } from 'vuex';
import { store as services } from '@/store/modules/services';
import { store as users } from '@/store/modules/users';

//eslint-disable-next-line no-undef
let debug = process.env.NODE_ENV !== 'production';
debug = false;

const plugins = debug ? [createLogger({})] : [];

export const store = createStore({
  plugins,
  modules: {
    services,
    users
  },
});

export function useStore() {
  return store;
}
