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: 'order_id',
      label: 'ID',
      formItemClass: 'col-span-6',
      dependencies: {
        show: false,
        triggerFields: ['oreder_id'],
      },
    },
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '请输入快递单号',
      },
      fieldName: 'express_no',
      label: '快递单号',
      rules: 'required',
    },
    {
      component: 'ExpressCompanySelect',
      componentProps: {
        placeholder: '请选择快递公司',
      },
      fieldName: 'express_company_code',
      formItemClass: 'col-span-6',
      label: '快递公司',
      rules: 'required',
    },
    {
      component: 'Textarea',
      componentProps: {
        placeholder: '请输入订单备注',
      },
      fieldName: 'introduce',
      label: '发货备注',
    },
  ],
  showDefaultActions: false,
};
export const modalRefundFormProps: VbenFormProps = {
  wrapperClass: 'grid-cols-12', // 24栅格,
  commonConfig: {
    formItemClass: 'col-span-12',
    // 所有表单项
    componentProps: {
      class: 'w-full',
    },
  },
  // handleSubmit: onSubmit,
  layout: 'horizontal',
  schema: [
    {
      component: 'VbenInput',
      fieldName: 'order_id',
      label: 'ID',
      formItemClass: 'col-span-6',
      dependencies: {
        show: false,
        triggerFields: ['order_id'],
      },
    },
    {
      component: 'Textarea',
      componentProps: {
        placeholder: '请输入退款备注',
      },
      fieldName: 'refund_reason',
      label: '退款备注',
    },
  ],
  showDefaultActions: false,
};
