import type { Module } from 'vuex';

export const SET_PREPARED_SOCKET = 'SET_PREPARED_SOCKET';

export const global: Module<Record<string, any>, Record<string, any>> = {
  namespaced: true,
  state: {
    preparedSocket: false,
  },
  getters: {
    preparedSocket: state => state.preparedSocket,
  },
  mutations: {
    [SET_PREPARED_SOCKET](state, bool) {
      state.preparedSocket = bool;
    },
  },
};
