<template>
  <toggle
    :checked="checked"
    data-cy="toggle-editing"
    label="Modul anpassen"
    @input="toggle"/>
</template>

<script>
  import {mapState, mapActions} from 'vuex';
  import Toggle from '@/components/ui/Toggle';

  export default {
    components: {
      Toggle
    },

    computed: {
      ...mapState({
        checked: 'editModule',
      }),
    },

    methods: {
      ...mapActions({
        toggle: 'editModule',
      }),
    },
  };
</script>
