import type { VbenFormProps } from '#/adapter/form';

export const modalFormProps: VbenFormProps = {
  wrapperClass: 'grid-cols-12', // 24栅格,
  commonConfig: {
    formItemClass: 'col-span-12',
    // 所有表单项
    componentProps: {
      class: 'w-full',
    },
  },
  // handleSubmit: onSubmit,
  layout: 'horizontal',
  schema: [
    // {
    //   fieldName: 'baseinfo',
    //   component: 'Divider',
    //   label: '基础信息',
    //   formItemClass: 'col-span-12',
    //   componentProps: {},
    //   hideLabel: true,
    //   renderComponentContent: () => {
    //     return {
    //       default: () => {
    //         return '基础信息';
    //       },
    //     };
    //   },
    // },
    {
      component: 'VbenInput',
      fieldName: 'id',
      label: 'ID',
      formItemClass: 'col-span-6',
      dependencies: {
        show: false,
        triggerFields: ['id'],
      },
    },
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '请输入协议昵称',
      },
      fieldName: 'desc',
      label: '协议名称',
      rules: 'required',
    },
    {
      component: 'Editor',
      componentProps: {
        placeholder: '请输入协议介绍',
      },
      fieldName: 'content',
      label: '协议内容',
      rules: 'required',
    },
  ],
  showDefaultActions: false,
};
