<script setup lang="ts">
import formCreate from '@form-create/ant-design-vue'

import { ref } from 'vue'

// import { useFormCreateStore } from '@/store/modules/fc'

const formData = ref({})
const formApi = ref(null)

// const fcStore = useFormCreateStore()

const formRules = ref([
  {
    type: 'input',
    field: 'F1pom74ios1tacc',
    title: '输入框',
    $required: false,
    _fc_id: 'id_F3pvm74ios1tadc',
    name: 'ref_F5t6m74ios1taec',
    display: true,
    hidden: false,
    _fc_drag_tag: 'input',
  },
  {
    type: 'input',
    field: 'F4mzm74iossdafc',
    title: '多行输入框',
    $required: false,
    props: {
      type: 'textarea',
    },
    _fc_id: 'id_F8w8m74iossdagc',
    name: 'ref_Fvgmm74iossdahc',
    display: true,
    hidden: false,
    _fc_drag_tag: 'textarea',
  },
  {
    type: 'aMentions',
    modelField: 'value',
    field: 'Fytam74iot6saic',
    title: '提及',
    $required: false,
    props: {
      options: [
        {
          label: 'Fuphoenixes',
          value: 'Fuphoenixes',
        },
        {
          label: 'kooriookami',
          value: 'kooriookami',
        },
        {
          label: 'Jeremy',
          value: 'Jeremy',
        },
        {
          label: 'btea',
          value: 'btea',
        },
      ],
    },
    _fc_id: 'id_F09cm74iot6sajc',
    name: 'ref_Fu38m74iot6sakc',
    display: true,
    hidden: false,
    _fc_drag_tag: 'aMentions',
  },
  {
    type: 'input',
    field: 'Fzd0m74iotg9alc',
    title: '输入框',
    $required: false,
    _fc_id: 'id_Fb8vm74iotg9amc',
    name: 'ref_Fl6om74iotg9anc',
    display: true,
    hidden: false,
    _fc_drag_tag: 'input',
  },
])

// const refFcStore = storeToRefs(fcStore)
//
// watchEffect(() => {
//   formRules.value = refFcStore.getInfo.value.rule
// })
</script>

<template>
  <div>
    <!--    {{ refFcStore.getInfo.value.rule }} -->
    <form-create v-model="formData" v-model:api="formApi" :rule="formRules" />
  </div>
</template>
