<template>
  <div>
    <c-list v-show="step == 1" @changeStep="changeStep" />
    <c-sublist v-if="step == 2" :detailItem="detailItem" @changeStep="changeStep" />
  </div>
</template>

<script>
import CList from './list'
import CSublist from './sublist'

export default {
  components: {
    'c-list': CList,
    'c-sublist': CSublist
  },

  data() {
    return {
      step: 1,
      detailItem: null
    }
  },

  methods: {

    changeStep(obj) {
      this.step = obj.step
      this.detailItem = obj.item
    },

  }

}
</script>

<style></style>
