<template>
  <div class="dv-index-switch"><slot></slot></div>
</template>

<script>
export default {
  name: 'DvIndexSwitch',
  props: {
    value: {
      type: [String, Number]
    }
  },
  provide () {
    return {
      indexSwitch: this
    };
  },
  watch: {
    value (value) {
      this.currentValue = value;
    }
  },
  data () {
    return {
      items: [],
      currentValue: this.value
    };
  },
  methods: {
    addItem (item) {
      this.items.push(item);
    },
    select (value) {
      this.$emit('input', value);
    }
  }
};
</script>
