<template>
  <div class="app-container">
    <transition name="el-zoom-in-center">
      <check-job-list v-if="options.showList" @showCard="showCard" />
    </transition>
    <transition name="el-zoom-in-top">
      <check-job-add v-if="options.showAdd" :data="options.data" @showCard="showCard" />
    </transition>
    <transition name="el-zoom-in-top">
      <check-job-edit v-if="options.showEdit" :data="options.data" @showCard="showCard" />
    </transition>
  </div>
</template>

<script>
import CheckJobList from './CheckJobList'
import CheckJobAdd from './CheckJobAdd'
import CheckJobEdit from './CheckJobEdit'

export default {
  name: 'CheckJob',
  components: { CheckJobList, CheckJobAdd, CheckJobEdit },
  data() {
    return {
      options: {
        data: {},
        showList: true
      }
    }
  },
  methods: {
    showCard(data) {
      Object.assign(this.options, data)
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
