export default {
  data() {
    return {
      rememberMe: this.$store.state.useLocalStorage
    }
  },
  watch: {
    rememberMe(val) {
      if (val != this.$store.state.useLocalStorage) {
        this.$store.commit("setUseLocalStorage", val);
      }
    },
    "$store.state.useLocalStorage": {
      handler(val) {
        if (val != this.rememberMe) {
          this.rememberMe = val;
        }
      }
    }
  }
}