import Vue from 'vue/dist/vue'

Vue.component('tab', {
    props: {
        name: {required: true},
        label: {required: true},
        selected: {default: false}
    },
    data() {
        return {
            isSelected: false
        };
    },
    mounted() {
        this.isSelected = this.selected;
    },
    template: `
      <div v-if="isSelected"
           class="active"
      >
        <slot></slot>
      </div>
    `,
});