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: [
    {
      component: 'VbenInput',
      fieldName: 'id',
      label: 'ID',
      formItemClass: 'col-span-6',
      defaultValue: '',
      dependencies: {
        show: false,
        triggerFields: ['id'],
      },
    },
    {
      component: 'VbenInput',
      fieldName: 'platform_id',
      label: '平台ID',
      formItemClass: 'col-span-6',
      defaultValue: 1,
      dependencies: {
        show: false,
        triggerFields: ['platform_id'],
      },
    },
    {
      component: 'Divider',
      fieldName: '',
      label: '联系方式',
      formItemClass: 'col-span-12',
      hideLabel: true,
      renderComponentContent: () => {
        return {
          default: () => {
            return '联系方式';
          },
        };
      },
    },
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '请输入联系电话',
      },
      fieldName: 'contact_phone',
      label: '联系电话',
      formItemClass: 'col-span-6',
      defaultValue: '',
    },
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '请输入联系邮箱',
      },
      fieldName: 'contact_email',
      label: '联系邮箱',
      formItemClass: 'col-span-6',
      defaultValue: '',
    },
    {
      component: 'Textarea',
      componentProps: {
        placeholder: '请输入联系地址',
        rows: 2,
      },
      fieldName: 'contact_address',
      label: '联系地址',
      formItemClass: 'col-span-12',
      defaultValue: '',
    },
    {
      component: 'Divider',
      fieldName: '',
      label: '投诉举报方式',
      formItemClass: 'col-span-12',
      hideLabel: true,
      renderComponentContent: () => {
        return {
          default: () => {
            return '投诉举报方式';
          },
        };
      },
    },
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '请输入投诉电话',
      },
      fieldName: 'complaint_phone',
      label: '投诉电话',
      formItemClass: 'col-span-6',
      defaultValue: '',
    },
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '请输入投诉邮箱',
      },
      fieldName: 'complaint_email',
      label: '投诉邮箱',
      formItemClass: 'col-span-6',
      defaultValue: '',
    },
    {
      component: 'Textarea',
      componentProps: {
        placeholder: '请输入投诉地址',
        rows: 2,
      },
      fieldName: 'complaint_address',
      label: '投诉地址',
      formItemClass: 'col-span-12',
      defaultValue: '',
    },
  ],
  showDefaultActions: false,
};
