const mqttServer = {
  state: {
    serverIP: sessionStorage.getItem('serverIP') ? sessionStorage.getItem('serverIP') : '',
    serverPort: sessionStorage.getItem('serverPort') ? sessionStorage.getItem('serverPort') : ''
  },
  mutations: {
    set_serverIP(state, serverIP) {
      sessionStorage.setItem('serverIP', serverIP)
      state.serverIP = serverIP
    },
    set_serverPort(state, serverPort) {
      sessionStorage.setItem('serverPort', serverPort)
      state.serverPort = serverPort
    }
  }
}

export default mqttServer
