<script>
import { mapMutations } from 'vuex'
export default {
  props: ['question', 'index', 'pIndex'],
  methods: {
    ...mapMutations(['setQuestionIndex']),
    startEdit: function (active) {
      this.setQuestionIndex({ index: this.index, active })
      // this.$parent.startEdit({ startActive: active })
      // this.$emit('edit', {
      //   startActive: active
      // })
      // if (this.questionIndex != null) {
      //   if (this.autoSaveQuestion()) {
      //     this.$store.dispatch('startEdit', {
      //       questionIndex: this.index,
      //       startActive: active
      //     })
      //   }
      // } else {
      //   this.$store.dispatch('startEdit', {
      //     questionIndex: this.index,
      //     startActive: active
      //   })
      // }
    }
  }
}
</script>
