import { VNode } from "vue";
import {
  CascaderOption,
  CascaderResponse,
  CommonResponse,
  LocationResponse,
  UploadResponse,
} from "./api";
import { WorkflowComponent } from "./component";

type Dictionary = {
  key: string;
  value: string;
};

export declare class WorkflowCollect extends WorkflowComponent {
  /** 子组件加载数据方法，通过provide提供给子组件 */
  dataLoadApis: {
    gridRegionByPoint: (point: string) => CommonResponse<[]>;
    getCascaderOptionData: (params: {
      parentCodes: string;
      level: number;
    }) => CascaderResponse;
    loadLocation: () => LocationResponse;
    uploadFiles: (files: { file: File }[]) => UploadResponse;
  };

  /** 默认地图中心显示 */
  mapCenter: string;

  /** 适老化样式 */
  isElder: boolean;

  $slots: {
    formArea: VNode[];
  };

  $emit: {
    /** 表单验证失败事件 */
    fail: (reason: { err: string }[]) => void;

    /** 提交事件 */
    submit: (form: { [x: string]: string }) => void;
  };
}
