<template>
  <div class="app-container">
    <transition name="el-zoom-in-center">
      <offline-data-list v-if="options.showList" @showCard="showCard" />
      <offline-data-detail v-if="options.showDetail" @showCard="showCard" />
    </transition>
  </div>
</template>

<script>
  import OfflineDataList from './OfflineDataList'
  import OfflineDataDetail from './OfflineDataDetail'

  export default {
    name: 'OfflineData',
    components: { OfflineDataList, OfflineDataDetail },
    data() {
      return {
        options: {
          data: {},
          showList: true,
          showDetail: true
        }
      }
    },
    methods: {
      showCard(data) {
        Object.assign(this.options, data)
      }
    }
  }
</script>

<style lang="scss" scoped>

</style>
