import { dk as _default, m0 as cloneElement, aA as jsxRuntimeExports, Y as Dropmenu, aj as LazyLoad, aJ as Authorized, kU as ActionKeys, z as useStaticCallback, t as toastApi, ao as Tooltip, y as IconButton, an as Button, li as UpdateDataTable, x as Popconfirm, i as __read, a5 as get, I as Icon, U as map, bC as size, aK as Previleges, aF as drawerApi, kn as keys, X as find, s as __assign$1, lf as omit, W as filter } from './MapEditView-67426f04.js';
import * as React from 'react';
import React__default from 'react';
import { observer } from 'mobx-react';
import { useUpdate } from 'react-use';
import { TablePopconfirm } from './PopconfirmTitle-ca2e9562.js';
import { i as i18n, M as MyDataTableContext, p as prefixCls$1, g as getAuthEntity, A as ActionTypeEnum } from './index-0d47f21f.js';
import classNames from 'classnames';
import dayjs from 'dayjs';
import 'maptalks';
import 'lodash';
import 'uuid';
import 'mobx';
import 'lz-string';
import 'react-dom';
import 'react-is';
import '@loadable/component';
import 'js-beautify';
import 'axios';
import 'superstruct';
import '@tanem/react-nprogress';
import 'jquery';
import 'chroma-js';
import 'js-cookie';
import 'is-email';
import 'is-uuid';
import 'is-url';
import 'anymatch';
import 'perf-request';
import '@syncpoint/wkx';
import 'buffer';
import '@turf/turf';
import '@mapbox/polylabel';
import 'turf-multipolygon';
import 'turf-polygon';
import 'gcoord';
import 'eventemitter2';
import 'geobuf';
import 'localforage';
import 'rc-menu';
import 'perfect-scrollbar';
import 'ahooks';
import 'jszip';
import 'file-saver';
import 'screenfull';
import 'sql-formatter-fork';
import 'array-move';
import 'turf-multilinestring';
import 'copy-to-clipboard';
import 'maptalks.three';
import 'ajv';
import 'spark-md5';
import 'react-draggable';
import 'react-virtualized';
import 'turf-point';
import 'decamelize';
import 'rbush';
import 'qs';
import 'maptalks.snap';
import 'react-rnd';
import 'react-beautiful-dnd';
import 'react-contextmenu';
import './orderBy-e2803ab1.js';
import 'coordtransform';
import './compact-8e87287d.js';
import './useDataValue-bfcabd04.js';
import 'react-dnd-html5-backend';
import 'ali-react-table-fork';
import './Transfer-20410a61.js';
import 'ismobilejs';

var __assign = undefined && undefined.__assign || function () {
  __assign = Object.assign || function (t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
      s = arguments[i];

      for (var p in s) {
        if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
      }
    }

    return t;
  };

  return __assign.apply(this, arguments);
};

var __rest = undefined && undefined.__rest || function (s, e) {
  var t = {};

  for (var p in s) {
    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  }

  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  }
  return t;
};
var prefixCls = 'dmc-adaptive-more';
var prefixClsItem = prefixCls + "-item";

var getAttrNum = function getAttrNum(style, key) {
  var val = "" + style.getPropertyValue(key).replace('px', '');
  return val ? parseFloat(val) : 0;
};

var AdaptiveMore = function AdaptiveMore(props) {
  var className = props.className,
      children = props.children,
      renderMore = props.renderMore,
      moreLabel = props.moreLabel,
      getProcess = props.getProcess,
      restProps = __rest(props, ["className", "children", "renderMore", "moreLabel", "getProcess"]);

  var _a = _default(),
      ref = _a[0],
      width = _a[1].width;

  var _b = _default(),
      moreRef = _b[0],
      mWidth = _b[1].width;

  var parentRef = React.useRef(null);
  var widthRef = React.useRef({});
  var all = React.useMemo(function () {
    return React.Children.toArray(children).map(function (it) {
      return cloneElement(it, {
        className: classNames(prefixClsItem, it.props.className)
      });
    });
  }, [children]);

  var _c = React.useState({
    viewList: all,
    hiddenList: []
  }),
      list = _c[0],
      setList = _c[1];

  React.useEffect(function () {
    var widthMap = {};
    var eleList = parentRef.current.querySelectorAll("." + prefixClsItem);
    all.forEach(function (it, index) {
      var ist = window.getComputedStyle(eleList[index]);
      widthMap[it.key] = getAttrNum(ist, 'width') + getAttrNum(ist, 'margin-left') + getAttrNum(ist, 'margin-right');
    });
    widthRef.current = widthMap;
  }, [all]);
  React.useEffect(function () {
    var wdTotal = 0;
    var vl = [];
    var hl = [];
    all.forEach(function (it) {
      var w = widthRef.current[it.key] || 0;
      wdTotal += w;
      wdTotal <= width - (mWidth || 0) ? vl.push(it) : hl.push(it);
    });
    setList({
      viewList: vl,
      hiddenList: hl
    });
  }, [all, width, mWidth, getProcess]);
  var cls = classNames(prefixCls, className);
  var moreNode = renderMore ? renderMore(list.hiddenList) : !!list.hiddenList.length && jsxRuntimeExports.jsx(Dropmenu, __assign({
    onlyText: true,
    renderOverlay: function renderOverlay() {
      return jsxRuntimeExports.jsx(React.Fragment, {
        children: list.hiddenList
      }, void 0);
    }
  }, {
    children: moreLabel
  }), void 0);
  return jsxRuntimeExports.jsxs("div", __assign({}, restProps, {
    ref: ref,
    className: cls
  }, {
    children: [jsxRuntimeExports.jsx("div", __assign({
      className: prefixCls + "-hidden",
      ref: parentRef
    }, {
      children: all
    }), void 0), jsxRuntimeExports.jsx("div", __assign({
      className: prefixCls + "-inner"
    }, {
      children: list.viewList
    }), void 0), jsxRuntimeExports.jsx("div", __assign({
      className: prefixCls + "-more",
      ref: moreRef
    }, {
      children: moreNode
    }), void 0)]
  }), void 0);
};

AdaptiveMore.displayName = 'AdaptiveMore';
var AdaptiveMoreMemo = /*#__PURE__*/React.memo(AdaptiveMore);
AdaptiveMoreMemo.displayName = 'AdaptiveMoreMemo';

var Format = 'YYYY-MM-DD HH:mm';
var Collaboration = LazyLoad(function () { return import('./index-0d47f21f.js').then(function (n) { return n.d; }); });
var hasPermission = Authorized.hasPermission;
var menus3 = [
    { title: i18n.dataTable.dataInputTemplate, key: 'template', disabled: true },
    // { title: i18n.coordination.start, key: 'start', divider: true },
    {
        title: i18n.dataTable.latlngConversion,
        key: ActionKeys.Conversion,
    },
    {
        title: i18n.dataTable.freezeCol,
        key: 'lock-column',
        children: [
            { title: i18n.dataTable.freezeCol1, key: 'lock-1' },
            { title: i18n.dataTable.freezeCol2, key: 'lock-2' },
            { title: i18n.dataTable.freezeCol3, key: 'lock-3' },
            { title: i18n.dataTable.freezeCol4, key: 'lock-4', divider: true },
            { title: i18n.dataTable.cancelFreeze, key: 'lock--1' },
        ],
    },
];
var downloadMenus = [
    { title: i18n.dataTable.downloadCsv, key: 'csv-' },
    { title: i18n.dataTable.downloadCsvWithUser, key: 'csv-user' },
    { title: i18n.dataTable.downloadXlsx, key: 'xlsx-' },
    { title: i18n.dataTable.downloadXlsxWithUser, key: 'xlsx-user' },
];
//todo  单例模式下重新引入地图会导致store被卸载
var isCtrl = function (event) { return event.ctrlKey || event.metaKey; };
var isShift = function (event) { return event.shiftKey; };
var Lock = observer(function (_a) {
    var className = _a.className;
    var _b = React__default.useContext(MyDataTableContext), store = _b.store, options = _b.options;
    var _c = store.cTableStore, locked = _c.locked, changeLock = _c.changeLock, saveDisabled = _c.saveDisabled, updateTable = _c.updateTable, isGeoCoding = _c.isGeoCoding, globalAuth = _c.globalAuth;
    var onClick = useStaticCallback(function () {
        saveDisabled &&
            changeLock(undefined, function (type, msg) {
                // @ts-ignore
                toastApi[type](msg);
            }, options === null || options === void 0 ? void 0 : options.endAddRow);
    });
    var node = React__default.useMemo(function () { return (React__default.createElement(Tooltip, { overlay: locked ? i18n.dataTable.unLockIconTip : i18n.dataTable.lockIconTip },
        React__default.createElement(IconButton, { icon: locked ? 'lock-on' : 'lock-off', onClick: onClick, ghost: true, disabled: isGeoCoding || !globalAuth, className: className }))); }, [className, globalAuth, isGeoCoding, locked, onClick]);
    var footerNode = React__default.useCallback(function (onCancel) {
        return (React__default.createElement("div", { className: "".concat(prefixCls$1, "-tools-item-lock-footer") },
            React__default.createElement(Button, { onClick: onCancel, size: "compact" }, i18n.dataTable.backEdit),
            React__default.createElement(Button, { onClick: function (e) {
                    updateTable(UpdateDataTable.Reset);
                    onCancel(e);
                }, size: "compact" }, i18n.dataTable.abondonSave),
            React__default.createElement(Button, { size: "compact", onClick: function (e) {
                    changeLock(true, function (type, msg) {
                        // @ts-ignore
                        toastApi[type](msg);
                    }, options === null || options === void 0 ? void 0 : options.endAddRow);
                    onCancel(e);
                } }, i18n.dataTable.saveAndLock)));
    }, [changeLock, options, updateTable]);
    return (React__default.createElement(React__default.Fragment, null, saveDisabled ? (node) : (React__default.createElement(Popconfirm, { placement: "bottomLeft", message: i18n.dataTable.saveTip, trigger: "click", emotion: 'help-2', overlayStyle: { width: 383 }, className: className, overlayClassName: "".concat(prefixCls$1, "-tools-item-lock-popconfirm"), footer: footerNode }, node))));
});
Lock.displayName = 'Lock';
var AddColumn = observer(function (_a) {
    var className = _a.className, children = _a.children, visible = _a.visible;
    var store = React__default.useContext(MyDataTableContext).store;
    var _b = store.cTableStore, locked = _b.locked, isGeoCoding = _b.isGeoCoding, isCollaboratedV2 = _b.isCollaboratedV2;
    var _c = __read(React__default.useState(visible || false), 2), addColumnPopVis = _c[0], setAddColumnPopVis = _c[1];
    var onVisibleChange = useStaticCallback(function (vis) { var _a; return setAddColumnPopVis((_a = !addColumnPopVis) !== null && _a !== void 0 ? _a : vis); });
    var changeShow = useStaticCallback(function () { return setAddColumnPopVis(true); });
    React__default.useEffect(function () {
        !!visible && setAddColumnPopVis(visible);
    }, [visible]);
    return (React__default.createElement(TablePopconfirm, { visible: addColumnPopVis, onVisibleChange: onVisibleChange }, children || (React__default.createElement(Tooltip, { overlay: i18n.dataTable.addColIconTip },
        React__default.createElement(IconButton, { icon: "add-column", ghost: true, disabled: locked || isGeoCoding || isCollaboratedV2, onClick: changeShow, className: className })))));
});
AddColumn.displayName = 'AddColumn';
var DataInfo = observer(function (_a) {
    var onClose = _a.onClose;
    var store = React__default.useContext(MyDataTableContext).store;
    var cPackage = store.cPackage;
    var tableData = store.cTableStore.tableData;
    var uploadName = React__default.useRef('');
    var update = useUpdate();
    React__default.useEffect(function () {
        var userId = get(store, 'cTableStore.packageItem.userId');
        userId &&
            getAuthEntity({ ids: userId }, function (res) {
                var data = get(res, 'data.result') || [];
                var user = find(data, function (vl) { return vl.id === userId; });
                if (user) {
                    uploadName.current = user.name;
                    update();
                }
            });
        // eslint-disable-next-line react-hooks/exhaustive-deps
    }, []);
    var createTime = get(store, 'cTableStore.packageItem.createTime'), updateTime = get(store, 'cTableStore.packageItem.updateTime');
    if (!createTime) {
        createTime = dayjs().format(Format);
    }
    else {
        createTime =
            createTime.toString().length > 10
                ? dayjs(createTime).format(Format)
                : dayjs.unix(createTime).format(Format);
    }
    if (!updateTime) {
        updateTime = dayjs().format(Format);
    }
    else {
        updateTime =
            updateTime.toString().length > 10
                ? dayjs(updateTime).format(Format)
                : dayjs.unix(updateTime).format(Format);
    }
    var list = [
        { label: i18n.dataTable.dataName, value: cPackage.name },
        { label: i18n.dataTable.dataLength, value: tableData.length },
        {
            label: i18n.dataTable.createTime,
            value: createTime,
        },
        {
            label: i18n.dataTable.dataUpdatetime,
            value: updateTime,
        },
        { label: i18n.dataTable.uploadUser, value: uploadName.current },
    ];
    return (React__default.createElement("div", { className: "".concat(prefixCls$1, "-tools-datainfo") },
        React__default.createElement("div", { className: "".concat(prefixCls$1, "-tools-datainfo-header") },
            React__default.createElement(Icon, { icon: "close", onClick: onClose }),
            i18n.dataTable.dataInfo),
        React__default.createElement("div", { className: "".concat(prefixCls$1, "-tools-datainfo-body") }, map(list, function (item) {
            var _a;
            var valueCls = classNames("".concat(prefixCls$1, "-tools-datainfo-item-value"), (_a = {},
                _a["".concat(prefixCls$1, "-tools-datainfo-item-value-active")] = item.status,
                _a));
            return (React__default.createElement("div", { className: "".concat(prefixCls$1, "-tools-datainfo-item"), key: item.label },
                React__default.createElement("div", { className: "".concat(prefixCls$1, "-tools-datainfo-item-label") }, item.label),
                React__default.createElement("div", { className: valueCls }, item.value)));
        }))));
});
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var showDataInfo = function (Context, value, prefixCls) {
    drawerApi.open(function (onClose) {
        return (React__default.createElement(Context.Provider, { value: value },
            React__default.createElement(DataInfo, { onClose: onClose })));
    }, { width: '36vw', className: "".concat(prefixCls, "-drawer") });
};
var renderIcon = function (iconProps, key) {
    var iconNode = (React__default.createElement(Tooltip, { overlay: iconProps.title, "data-key": key, key: key },
        React__default.createElement(IconButton, __assign$1({ icon: key, ghost: true }, omit(iconProps, ['title', 'authority'])))));
    return iconNode;
};
var DataTableTool = observer(function () {
    var Context = MyDataTableContext;
    var value = React__default.useContext(Context);
    var store = value.store, options = value.options, isFromMyData = value.isFromMyData, storeRef = value.storeRef;
    var _a = options !== null && options !== void 0 ? options : {}, onAddCharts = _a.onAddCharts, onAddMap = _a.onAddMap, endAddRow = _a.endAddRow, convertLnglat = _a.convertLnglat, startAddRow = _a.startAddRow;
    var _b = store.cTableStore, prevResetAction = _b.prevResetAction, nextResetAction = _b.nextResetAction, prevResetDisabled = _b.prevResetDisabled, nextResetDisabled = _b.nextResetDisabled, saveDisabled = _b.saveDisabled, updateTable = _b.updateTable, changeSaveDisabled = _b.changeSaveDisabled, locked = _b.locked, changeItem = _b.changeItem, lockLength = _b.lockLength, download = _b.download, isGeoCoding = _b.isGeoCoding, isSourceMarket = _b.isSourceMarket, isSourcePrivate = _b.isSourcePrivate, isSourcePrivateV2 = _b.isSourcePrivateV2, isSourceCustom = _b.isSourceCustom, isSQL = _b.isSQL, updateItem = _b.updateItem, isPlain = _b.isPlain, tableData = _b.tableData, downloadPermission = _b.downloadPermission, packageItem = _b.packageItem, getMetaDataInfo = _b.getMetaDataInfo, isCollaborationV2 = _b.isCollaborationV2, isCreateBySelf = _b.isCreateBySelf, isCollaboratedV2 = _b.isCollaboratedV2;
    // useKey('z', (event: KeyboardEvent) => {
    //   isCtrl(event) && isShift(event) ? nextResetAction() : prevResetAction();
    // });
    var actionMenus = map(menus3, function (item) {
        item.key === ActionKeys.Conversion && (item.disabled = isGeoCoding);
        item.key === 'lock-column' &&
            item.children &&
            (item.children[4].disabled = lockLength - 1 === 0);
        return item;
    });
    var _c = __read(React__default.useState(false), 2), visible = _c[0], setVisible = _c[1];
    var addQe = useStaticCallback(onAddCharts);
    var addMap = useStaticCallback(onAddMap);
    var conversion = useStaticCallback(function () {
        return changeItem({ key: ActionKeys.Conversion }, convertLnglat);
    });
    var addColumn = useStaticCallback(function () { return setVisible(true); });
    var save = useStaticCallback(function () {
        return changeSaveDisabled(function (type, msg) {
            // @ts-ignore
            toastApi[type](msg);
        }, endAddRow);
    });
    var renderMore = function (hiddenList) {
        var iconInfoMenu = [
            {
                key: 'redo-2',
                onClick: nextResetAction,
                title: i18n.dataTable.redo,
                divider: true,
                disabled: locked || isGeoCoding,
            },
            {
                key: 'add-column',
                onClick: addColumn,
                title: i18n.dataTable.addCol,
                disabled: locked || isGeoCoding || isCollaboratedV2,
            },
            {
                key: 'add-row',
                onClick: function () { return updateItem({ key: ActionKeys.AddRow }, undefined, startAddRow); },
                title: i18n.dataTable.addRow,
                divider: true,
                disabled: (isPlain && !isSourcePrivateV2) || locked || isGeoCoding,
            },
            {
                key: 'pie-chart',
                onClick: addQe,
                title: i18n.dataTable.addQe,
                disabled: isGeoCoding || isSQL,
            },
            {
                key: 'map-2',
                onClick: addMap,
                title: i18n.dataTable.addMap,
                divider: true,
                disabled: isGeoCoding || isPlain,
            },
            {
                key: 'info-2-outlined',
                onClick: function () { return showDataInfo(Context, value, prefixCls$1); },
                title: i18n.dataTable.dataInfo,
                divider: true,
                disabled: isGeoCoding || size(tableData) === 0,
            },
            { title: i18n.dataTable.latlngConversion, key: 'more', onClick: conversion },
        ];
        var hiddenKeys = map(hiddenList, function (item) { return item.props['data-key']; });
        var hiddenMenus = filter(iconInfoMenu, function (item) { return hiddenKeys.includes(item.key); });
        return hiddenList.length ? (React__default.createElement(Dropmenu, { menus: hiddenMenus, onClickMenuItem: function (params) {
                var _a;
                var onClick = (_a = find(hiddenMenus, { key: params.key })) === null || _a === void 0 ? void 0 : _a.onClick;
                onClick && onClick(params);
            }, renderDropNode: function () { return (React__default.createElement("div", { className: "".concat(prefixCls$1, "-header-more") },
                React__default.createElement(Icon, { icon: "more", size: 18 }))); } })) : (React__default.createElement("div", null));
    };
    var marketKeyList = ['refresh-2', 'pie-chart', 'map-2', 'info-2-outlined', 'collabrate'];
    var isMarketKey = isSourceMarket || isSQL || (isSourcePrivate && !isSourcePrivateV2);
    var dividerCls = "".concat(prefixCls$1, "-tools-item-divider");
    var iconPropsMap = {
        lock: React__default.createElement(Lock, { key: "lock", "data-key": "lock" }),
        'refresh-2': {
            title: i18n.dataTable.refreshIconTip,
            onClick: function () {
                return updateTable(UpdateDataTable.Refresh, function () {
                    return toastApi.success(i18n.dataTable.dataReloadSuccess);
                });
            },
            disabled: isGeoCoding,
            className: isMarketKey ? dividerCls : '',
            key: 'refresh',
        },
        save: {
            title: i18n.dataTable.saveIconTip,
            onClick: save,
            disabled: saveDisabled || isGeoCoding,
            className: !isSourceMarket ? dividerCls : '',
            key: 'save',
        },
        'undo-2': {
            title: i18n.dataTable.resetIconTip,
            onClick: prevResetAction,
            disabled: prevResetDisabled || isGeoCoding || isSourcePrivateV2,
            key: 'undo',
        },
        'redo-2': {
            title: i18n.dataTable.redo,
            onClick: nextResetAction,
            disabled: nextResetDisabled || isGeoCoding || isSourcePrivateV2,
            className: !isSourceMarket ? dividerCls : '',
            key: 'redo',
        },
        'add-column': React__default.createElement(AddColumn, { "data-key": "add-column", key: "add-column" }),
        'add-row': {
            title: i18n.dataTable.addRowIconTip,
            onClick: function () { return updateItem({ key: ActionKeys.AddRow }, undefined, startAddRow); },
            disabled: (isPlain && !isSourcePrivateV2) || locked || isGeoCoding,
            className: !isSourceMarket ? dividerCls : '',
            key: 'addRow',
        },
        'pie-chart': {
            title: i18n.dataTable.addQeIconTip,
            onClick: onAddCharts,
            disabled: isGeoCoding || isSQL,
            key: 'pie-chart',
        },
        'map-2': {
            title: i18n.dataTable.addMapIconTip,
            onClick: onAddMap,
            disabled: isGeoCoding || isPlain,
            className: dividerCls,
            key: 'map',
        },
        'info-2-outlined': {
            title: i18n.dataTable.dataInfo,
            onClick: function () { return showDataInfo(Context, value, prefixCls$1); },
            disabled: isGeoCoding || !size(tableData),
            key: 'info',
        },
        collabrate: {
            title: isCreateBySelf ? i18n.coordination.start : i18n.coordination.startOwnerTip,
            //目前来说，只有v2专享的数据包可以进行协同
            disabled: !isCreateBySelf || !isSourcePrivateV2,
            authority: Previleges.createCollaboration,
            onClick: function () {
                if (!hasPermission(Previleges.createCollaboration)) {
                    toastApi.warning(i18n.coordination.startNoPermissionTip);
                    return;
                }
                drawerApi.open(function (onCancel) {
                    var onClose = function (e) {
                        getMetaDataInfo();
                        onCancel(e);
                    };
                    return (React__default.createElement(Context.Provider, { value: value },
                        React__default.createElement(Collaboration, { onClose: onClose, item: packageItem, storeRef: storeRef, actionType: !isCollaborationV2
                                ? ActionTypeEnum.add
                                : isCreateBySelf
                                    ? ActionTypeEnum.edit
                                    : ActionTypeEnum.view })));
                }, {
                    width: 917,
                });
            },
            key: 'swap',
        },
        more: (React__default.createElement(Dropmenu, { menus: actionMenus, values: ["lock-".concat(lockLength - 1)], icon: 'more', "data-key": "more", onClickMenuItem: function (params) { return changeItem(params, convertLnglat); }, overlayClassName: "".concat(prefixCls$1, "-tools-dropmenu"), key: "more" })),
    };
    var allList = map(keys(iconPropsMap), function (key) {
        var eleKeys = ['lock', 'add-column', 'more'];
        if (eleKeys.includes(key)) {
            return iconPropsMap[key];
        }
        var iconProps = iconPropsMap[key];
        return renderIcon(iconProps, key);
    });
    var marketList = map(marketKeyList, function (key) {
        var iconProps = iconPropsMap[key];
        return renderIcon(iconProps, key);
    });
    var list = isMarketKey ? marketList : allList;
    var shareNode = React__default.useMemo(function () {
        var iconProps = {
            title: i18n.dataTable.share,
            disabled: true ,
            key: 'share',
        };
        return renderIcon(iconProps, 'share');
    }, [isGeoCoding]);
    if (!isFromMyData) {
        return null;
    }
    return (React__default.createElement("div", { className: "".concat(prefixCls$1, "-tools") },
        React__default.createElement("div", { className: "".concat(prefixCls$1, "-tools-left") },
            React__default.createElement(AdaptiveMore, { renderMore: renderMore }, map(list, function (view) { return view; }))),
        React__default.createElement(AddColumn, { visible: visible },
            React__default.createElement("div", { className: "".concat(prefixCls$1, "-tools-middle") })),
        React__default.createElement("div", { className: "".concat(prefixCls$1, "-tools-right") },
            shareNode,
            (isSourcePrivateV2 || isSourceCustom) && (React__default.createElement(Authorized, { authority: Previleges.downloadData, noMatch: React__default.createElement(IconButton, { icon: "download", disabled: true }) }, isSourcePrivateV2 && !downloadPermission ? (React__default.createElement(IconButton, { icon: "download", disabled: true })) : (React__default.createElement(Dropmenu, { menus: downloadMenus, icon: 'download', onClickMenuItem: download, noSelected: true })))))));
});

export { DataTableTool as default, downloadMenus, isCtrl, isShift, menus3 };
