<template>
  <transition :name="transition" v-if="!disabled">
    <div v-show="isActive"
         class="mc-tab_pane"
         :class="{ 'is-active': isActive }">
      <slot></slot>
    </div>
  </transition>
</template>
<script>
export default {
  props: {
    icon: String,
    selected: Boolean,
    disabled: Boolean,
    label: {
      type: String,
      required: true,
    },
  },

  data() {
    return {
      isActive: false,
      transition: '',
    };
  },

  beforeCreate() {
    this.isTabPane = true;
  },

  methods: {
    // params (crtIndex, prevIndex)
    onActivated() {
      this.isActive = true;
//      this.transition = crtIndex > prevIndex ? 'fadeRight' : 'fadeRight';
//      console.log(crtIndex);
//      console.log(prevIndex);
    },
    deActivated() {
      this.isActive = false;
    },
  },
};
</script>
