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: 'Avatar',
      fieldName: 'logo',
      label: 'LOGO',
      defaultValue: 'https://xiaokang88.oss-cn-hangzhou.aliyuncs.com/xk_upload_20250108/1bb87d41d15fe27b500a4bfcde01bb0e.png',
      // rules: 'required',
    },
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '请输入供应商昵称',
      },
      fieldName: 'name',
      label: '供应商名称',
      rules: 'required',
    },
    {
      component: 'Textarea',
      componentProps: {
        placeholder: '请输入供应商介绍',
      },
      fieldName: 'introduce',
      label: '供应商介绍',
      rules: 'required',
    },
    {
      component: 'Avatar',
      fieldName: 'open_business_license',
      label: '营业执照',
      // rules: 'required',
      formItemClass: 'col-span-6',
    },
    {
      component: 'Avatar',
      fieldName: 'business_license',
      label: '生产许可证',
      // rules: 'required',
      formItemClass: 'col-span-6',
    },
    {
      component: 'Avatar',
      fieldName: 'product_registration_certificate',
      label: '产品注册证',
      formItemClass: 'col-span-6',
      // rules: 'required',
    },
  ],
  showDefaultActions: false,
};
