<template>
  <component :is="activeName" />
</template>

<script>
import List from './components/list'

export default {
  components: {
    List: List
  },
  data() {
    return {
      activeName: 'List',
      heirloom: {}
    }
  },
  methods: {
    setActiveName(activeName) {
      this.activeName = activeName
    },
    getHeirloom() {
      return this.heirloom
    },
    setHeirloom(heirloom) {
      this.heirloom = heirloom
    }
  },
  provide() {
    return {
      setActiveName: this.setActiveName,
      getHeirloom: this.getHeirloom,
      setHeirloom: this.setHeirloom
    }
  }
}
</script>

<style scoped>
</style>
