<script>
import QuestionsCountByTypePercent from './QuestionsCountByTypePercent.vue'
import QuestionsCountByTypeAndDifficultyPercent from './QuestionsCountByTypeAndDifficultyPercent.vue'
import MistakeOrderTower from './MistakeOrderTower.vue'
import QuestionDetailsLayout from './QuestionDetailsLayout.vue'

const components = [
  { QuestionsCountByTypePercent, QuestionsCountByTypeAndDifficultyPercent, MistakeOrderTower },
  { QuestionDetailsLayout }
]

export default {
  components: { ...components[0], ...components[1] },

  render (h) {
    const childs = []
    for (const key in components[this.$store.statistic_tab_active]) childs.push(h(key))
    return h('div', childs)
  }
}
</script>
