/**
 * 统计结果tabs弹窗
 */
import React from "react";
import Dialog from "../../../components/DragModal";
import { Button } from 'antd';
import { SchemaNode } from "../../../types";
import { TranslateFn } from "../../../locale";
interface IProps {
  container: HTMLElement | null;
  schema: any;
  render: (region: string, node: SchemaNode, props?: any) => JSX.Element;
  title: string;
  translate: TranslateFn<any>;
  onCloseModal: () => void;
  hide: boolean;
  onHide: () => void;
}
const ProcessToolsTabs = (props: IProps) => {
  const { container, render, title, translate: __, onCloseModal, hide, onHide, schema } = props;
  const onCloseDialog = () => {
    onCloseModal();
  }
  return (
    <Dialog
      getContainer={() => container || document.body}
      dialogVisible
      title={title}
      centered
      width={'90vw'}
      drag
      resizeable
      min
      maskClosable={false}
      setMaxSize
      canClickBelowDom
      mask={false}
      hide={hide}
      minHeight={600}
      onHide={onHide}
      onCancel={onCloseDialog}
      className={`calc-result-modal`}
      footer={null}
    >
      {render('', schema, { getTableInstance: () => { }, getTableStore: () => { } })}
    </Dialog>

  )
}
export default ProcessToolsTabs;