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

<script>
import List from './components/List'
import AddClass from './components/AddClass'
import ClassDetailsList from './components/ClassDetailsList'
import SeeClassMinsCtr from './components/SeeClassMinsCtr'
import AddCourseBox from './components/AddCourseBox'
import Learningrecords from './components/Learningrecords'
import StudentList from './components/StudentList'
import CourseList from './components/CourseList'
export default {
  components: {
    List,
    AddClass,
    ClassDetailsList,
    SeeClassMinsCtr,
    AddCourseBox,
    StudentList,
    Learningrecords,
    CourseList
  },
  data() {
    return {
      parentObj: {
        activeName: 'List',
        CLASS_ID: '',
        TabsActive: '',
        STATE: '',
        CLASSCURRICULUM_ID: '',
        STUDENT_ID: '',
        ENTERPRISE_ID: '',
        TRAINLEVEL_NAME: '',
        TYPE: ''
      }
    }
  },
  methods: {
    setCLASS_ID(CLASS_ID) {
      this.parentObj.CLASS_ID = CLASS_ID
    },
    setTabsActive(TabsActive) {
      this.parentObj.TabsActive = TabsActive
    },
    setSTATE(STATE) {
      this.parentObj.STATE = STATE
    },
    setActiveName(activeName) {
      this.parentObj.activeName = activeName
    },
    setCLASSCURRICULUM_ID(CLASSCURRICULUM_ID) {
      this.parentObj.CLASSCURRICULUM_ID = CLASSCURRICULUM_ID
    },
    setSTUDENT_ID(STUDENT_ID) {
      this.parentObj.STUDENT_ID = STUDENT_ID
    },
    setENTERPRISE_ID(ENTERPRISE_ID) {
      this.parentObj.ENTERPRISE_ID = ENTERPRISE_ID
    },
    setTRAINLEVEL_NAME(TRAINLEVEL_NAME) {
      this.parentObj.TRAINLEVEL_NAME = TRAINLEVEL_NAME
    },
    setTYPE(TYPE) {
      this.parentObj.TYPE = TYPE
    }
  },
  provide() {
    return {
      parentObj: this.parentObj,
      setCLASS_ID: this.setCLASS_ID,
      setTabsActive: this.setTabsActive,
      setSTATE: this.setSTATE,
      setActiveName: this.setActiveName,
      setCLASSCURRICULUM_ID: this.setCLASSCURRICULUM_ID,
      setSTUDENT_ID: this.setSTUDENT_ID,
      setENTERPRISE_ID: this.setENTERPRISE_ID,
      setTRAINLEVEL_NAME: this.setTRAINLEVEL_NAME,
      setTYPE: this.setTYPE
    }
  }
}
</script>

<style scoped>

</style>
