<script setup lang="ts">
import { ref } from 'vue'
import { useMessage } from '@/hooks/web/useMessage'
import { useFormCreateStore } from '@/store/modules/fc'

const designer = ref()

const fcStore = useFormCreateStore()

function onSave(e: any) {
  const { createMessage } = useMessage()
  createMessage.success()

  fcStore.setInfo(e)
}

const config = ref({
  showSaveBtn: true,
})
</script>

<template>
  <div>
    <fc-designer ref="designer" height="100vh" :config="config" @save="onSave" />
  </div>
</template>
