<template>
  <div class="d-flex flex-column">
        <v-switch v-model="newSettings.newMeetingNotificationExpanded" @change="updateSettings('newMeetingNotificationExpanded')" :label="'Always expand new meeting notification'"></v-switch>
    </div>
</template>

<script>
import { mapState } from "vuex";

export default {
    data() {
        return {
            newSettings: null
        }
    },
    computed: {
        ...mapState(["settings"]),
    },
    methods: {
        updateSettings(setting){
            localStorage.setItem(setting, this.newSettings[setting])
            this.$store.commit('updateSettings', this.newSettings)
            console.log('here')
        }
    },
    created(){
        this.newSettings = Object.assign({}, this.settings)
    }
}
</script>

<style>

</style>