import { ProColumnType } from '@ant-design/pro-table/es/Table';
import { InputProps } from 'antd/es/input';
import { Component, HTMLAttributes } from 'react';
import { TablePropsPure, TableState } from './table';

export type FormItemPinyinFirstLettersProps<T> = {
  item: Parameters<Required<ProColumnType<T>>['renderFormItem']>[0];
  config: Parameters<Required<ProColumnType<T>>['renderFormItem']>[1];
  form: Parameters<Required<ProColumnType<T>>['renderFormItem']>[2];
  comp: Component<TablePropsPure<T>, TableState<T>>;
  /** 被填充拼音首字母的表单域 */
  targetDataIndex: string;
  /** 默认值 */
  defaultValue?: HTMLAttributes<T>['defaultValue']
} & Partial<Pick<InputProps<T>, 'allowClear' | 'style' | 'placeholder'>>;