<template>
  <a-divider orientation="center">{{ props.fields.title }}</a-divider>
  <DynamicForm
    :parent="`${parent}.${curNodePath}`"
    :cur-node-path="curNodePath"
    :form-data="formData"
    :schema="fields"
  ></DynamicForm>
</template>

<script lang="ts" setup>
import { PropType } from 'vue'
import DynamicForm from '@/components/dynamicForm/index.vue'

const props = defineProps({
  rootFormData: {
    type: Object as PropType<object>
  },
  curNodePath: {
    type: String
  },
  fields: {
    type: Object as PropType<any>,
    default: () => {
      return {}
    }
  },
  placeholder: {
    type: String
  },
  formData: {
    type: Array as PropType<any[]>,
    default: () => []
  },
  parent: {
    type: String,
    default: () => 'formData'
  }
})
</script>
