<template>
  <custom-input :is="data.name" v-if="names.indexOf(data.name) > -1" :is-setting="isSetting" :data="data" :mode="model" />
</template>
<script>
import CustomComponentList from './list.js'
export default {
  name: 'CustomFormItemList',
  components: {
    ...CustomComponentList
  },
  props: {
    isSetting: Boolean,
    data: {
      type: Object,
      required: true
    },
    model: {
      type: [Object, null],
      default: null
    }
  },
  computed: {
    names() {
      return Object.keys(CustomComponentList)
    }
  }
}
</script>
