import type { FormInstance, FormProps } from "antd/es/form";
import type { UploadFile } from "antd/es/upload";
import type { FC, ReactNode } from "react";

export interface ImportFileProps extends Omit<FormProps, "form"> {
  /** 弹窗是否显示 */
  visible: boolean;
  /** 弹窗标题 */
  title?: string;
  /** 模板文件地址 */
  templateUrl?: string;
  /** 子组件 */
  children?: ReactNode | ((props: { form: FormInstance }) => ReactNode);
  /** 确认回调 */
  onConfirm: (values: { file?: UploadFile[]; [key: string]: any }) => void;
  /** 取消回调 */
  onCancel: () => void;
  /** 导出模板按钮文字，默认 “导出模板” */
  exportTemplateButtonText?: ReactNode;
  /** 额外按钮 */
  extraButtons?: ReactNode;
}

/**
 * 导入文件组件
 */
declare const ImportFile: FC<ImportFileProps>;

export default ImportFile;
