<template>
  <vee-object :title="model.nickname" :enable.sync="model.isUsed" :expand.sync="model.isExpand" :showTitle="showTitle">
    <VeeLabelEditList :model="model" :parentPropPath="propPath"></VeeLabelEditList>
  </vee-object>
</template>
<script>
import VeeObject from '../components/VeeObject'
import VeeLabelEditList from './VeeLabelEditList'
import { mapGetters } from 'vuex'
import { veeStoreName } from '../store/name'

export default {
  name: 'VeeObjectEdit',
  components: {
    VeeObject,
    VeeLabelEditList,
  },
  props: {
    model: {
      type: Object,
      default() {
        return {}
      }
    },
    parentPropPath: {
      type: String,
      default: ''
    },
    showTitle: {
      type: Boolean,
      default: true,
    },
  },
  methods: {
  },
  data () {
    return {
    }
  },
  computed: {
    propPath () {
      if (!this.parentPropPath) {
        return this.model.name
      } else {
        return `${this.parentPropPath}.${this.model.name}`
      }
    }
  }
}
</script>

<style lang="scss">
</style>
