"use strict";

function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireWildcard(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _antd = require("antd");
var _vtxThemeProvider = _interopRequireDefault(require("../vtx-theme-provider"));
var _vmIframeModal = _interopRequireDefault(require("../vm-iframe-modal"));
var _utils = require("@vtx/utils");
var _moment = _interopRequireDefault(require("moment"));
var _api = require("./api");
var _config = require("./config");
require("./style");
var _closeDark = _interopRequireDefault(require("./imgs/close-dark.png"));
var _close = _interopRequireDefault(require("./imgs/close.png"));
var _closeBlueNew = _interopRequireDefault(require("./imgs/close-blue-new.png"));
var _collect = _interopRequireDefault(require("./imgs/collect.png"));
var _collect_light = _interopRequireDefault(require("./imgs/collect_light.png"));
var _collectBlue = _interopRequireDefault(require("./imgs/collect-blue.png"));
var _track = _interopRequireDefault(require("./imgs/track.png"));
var _track_light = _interopRequireDefault(require("./imgs/track_light.png"));
var _track_blue = _interopRequireDefault(require("./imgs/track_blue.png"));
var _ahooks = require("ahooks");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
var getDetail = function getDetail(params) {
  return _utils.request.get('/cloud/zhgc-reborn/api/gis/pop/getById', {
    data: params
  });
};
var VtxBaseModal = function VtxBaseModal(props) {
  var _a;
  var contentRef = (0, _react.useRef)(null);
  var _useState = (0, _react.useState)({}),
    _useState2 = _slicedToArray(_useState, 2),
    contentStyle = _useState2[0],
    setContentStyle = _useState2[1];
  var _useState3 = (0, _react.useState)(false),
    _useState4 = _slicedToArray(_useState3, 2),
    hasCollect = _useState4[0],
    setHasCollect = _useState4[1];
  var _props$id = props.id,
    id = _props$id === void 0 ? '' : _props$id,
    _props$type = props.type,
    type = _props$type === void 0 ? '' : _props$type,
    title = props.title,
    visible = props.visible,
    _props$width = props.width,
    width = _props$width === void 0 ? 1437 : _props$width,
    _props$top = props.top,
    top = _props$top === void 0 ? 50 : _props$top,
    _props$left = props.left,
    left = _props$left === void 0 ? '50%' : _props$left,
    onCancel = props.onCancel,
    subTitle = props.subTitle,
    contents = props.contents,
    tabs = props.tabs,
    onTabsChange = props.onTabsChange,
    _props$theme = props.theme,
    theme = _props$theme === void 0 ? 'dark' : _props$theme,
    source = props.source,
    startDate = props.startDate,
    endDate = props.endDate,
    date = props.date,
    wrType = props.wrType,
    wrVer = props.wrVer,
    _props$defaultTabInde = props.defaultTabIndex,
    defaultTabIndex = _props$defaultTabInde === void 0 ? 0 : _props$defaultTabInde,
    tabChose = props.tabChose,
    _props$showCollect = props.showCollect,
    showCollect = _props$showCollect === void 0 ? false : _props$showCollect,
    _props$frameParams = props.frameParams,
    frameParams = _props$frameParams === void 0 ? {} : _props$frameParams,
    modalHeight = props.modalHeight;
  var _useState5 = (0, _react.useState)((_a = tabs === null || tabs === void 0 ? void 0 : tabs[defaultTabIndex]) === null || _a === void 0 ? void 0 : _a.key),
    _useState6 = _slicedToArray(_useState5, 2),
    tabKey = _useState6[0],
    setTabKey = _useState6[1];
  var _useState7 = (0, _react.useState)({}),
    _useState8 = _slicedToArray(_useState7, 2),
    newDetail = _useState8[0],
    setNewDetail = _useState8[1];
  var _useState9 = (0, _react.useState)({}),
    _useState10 = _slicedToArray(_useState9, 2),
    mapInfo = _useState10[0],
    setMapInfo = _useState10[1];
  var _useState11 = (0, _react.useState)(''),
    _useState12 = _slicedToArray(_useState11, 2),
    actionType = _useState12[0],
    setActionType = _useState12[1];
  var _useState13 = (0, _react.useState)(''),
    _useState14 = _slicedToArray(_useState13, 2),
    tabPosition = _useState14[0],
    setTabPosition = _useState14[1];
  var _useSetState = (0, _ahooks.useSetState)({
      src: '',
      visible: false,
      title: ''
    }),
    _useSetState2 = _slicedToArray(_useSetState, 2),
    iframeModalInfo = _useSetState2[0],
    setIframeModalInfo = _useSetState2[1];
  // 弹框内容最大高度：document高度--弹框头高度。在低分辨率下，如只有一个页签，最大高度要加上页签的高度，防止留白
  var MAX_CONTENT_HEIGHT = (0, _react.useMemo)(function () {
    return document.body.clientHeight - ((tabs === null || tabs === void 0 ? void 0 : tabs.length) > 1 ? 120 : 70);
  }, [tabs === null || tabs === void 0 ? void 0 : tabs.length]);
  (0, _react.useEffect)(function () {
    var _a;
    if (visible) if (tabChose) {
      setTabKey(tabChose);
    } else {
      setTabKey((_a = tabs === null || tabs === void 0 ? void 0 : tabs[0]) === null || _a === void 0 ? void 0 : _a.key);
    }
  }, [visible, tabChose, JSON.stringify(tabs || [])]);
  (0, _react.useEffect)(function () {
    (0, _api.getTenantById)((0, _utils.getVtxToken)('tenantId')).then(function (res) {
      var _a, _b;
      if (res === null || res === void 0 ? void 0 : res.data) {
        var data = ((_a = JSON.parse(res.data.mapDefJson)) === null || _a === void 0 ? void 0 : _a.find(function (ele) {
          return ele.defaultMap;
        })) || {};
        if ((_b = res.data) === null || _b === void 0 ? void 0 : _b.longitudeDone) {
          data.longitude = res.data.longitudeDone;
          data.latitude = res.data.latitudeDone;
        }
        setMapInfo(data);
      } else {
        setMapInfo({});
      }
    });
    (0, _api.getUmsConfig)('POPUP_TAB_POSITION').then(function (res) {
      var _a, _b, _c;
      setTabPosition(((_c = (_b = (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.rows) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.configInfo) || 'top');
    });
  }, []);
  (0, _react.useEffect)(function () {
    document.body.classList.add(theme);
    document.body.classList.add('overHiddenScroll');
    return function () {
      document.body.classList.remove(theme);
      document.body.classList.remove('overHiddenScroll');
    };
  }, []);
  var calculateHeight = (0, _ahooks.useMemoizedFn)(function () {
    var _a;
    var contentHeight = ((_a = contentRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight) || 0;
    if (contentHeight >= (tabPosition === 'top' ? MAX_CONTENT_HEIGHT : MAX_CONTENT_HEIGHT)) {
      setContentStyle({
        maxHeight: tabPosition === 'top' ? MAX_CONTENT_HEIGHT : MAX_CONTENT_HEIGHT,
        overflowY: 'auto'
      });
    } else {
      setContentStyle({});
    }
  });
  (0, _react.useEffect)(function () {
    var resizeObserver = new ResizeObserver(function () {
      calculateHeight();
    });
    if (contentRef.current) {
      resizeObserver.observe(contentRef.current, {
        box: 'border-box'
      });
    }
    return function () {
      resizeObserver.disconnect();
    };
  }, [tabPosition, contentRef.current]);
  (0, _react.useEffect)(function () {
    if (id && type && (!wrType || wrType !== 'new')) {
      (0, _api.fetchFavoriter)(id, type).then(function (res) {
        var _a;
        if (((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.length) > 0) {
          setHasCollect(res.data.includes(id));
        }
      });
    }
    if (wrType && wrType === 'new') {
      getDetail({
        id: id
      }).then(function (res) {
        if ((res === null || res === void 0 ? void 0 : res.result) === 0) {
          setNewDetail(res.data);
        }
      });
    }
    if (id && type === 'car') {
      (0, _api.getCarInfoByProductType)(id).then(function (res) {
        var _a;
        if (res === null || res === void 0 ? void 0 : res.data) {
          setActionType((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.actionType);
        } else {
          setActionType('');
        }
      });
    }
  }, [id, type]);
  // 收藏-取消收藏
  var toggleCollect = function toggleCollect() {
    if (hasCollect) {
      (0, _api.delFavoriter)(id, type).then(function (res) {
        if (res.result === 0) {
          setHasCollect(false);
        }
      });
    } else {
      (0, _api.saveFavoriter)(id, type).then(function (res) {
        if (res.result === 0) {
          setHasCollect(true);
        }
      });
    }
  };
  // 历史轨迹
  var clickTract = function clickTract(props) {
    var src = '';
    var prefix = '';
    var prefixList = location.pathname.split('/').filter(function (item) {
      return item;
    });
    if (prefixList.length === 2) {
      prefix = "/".concat(prefixList[0]);
    }
    if (type === 'car') {
      var path = 'index';
      switch (props.source || source) {
        case 'JXH':
          path = 'zyqsHistory';
          break;
        // 业务系统
        case 'business':
          path = 'indexLight';
          break;
        case 'CC':
          path = 'ccCarHistory';
          break;
      }
      src = "".concat(prefix, "/carHistory/#/").concat(path, "?carId=").concat(id, "&theme=").concat(theme == 'blue' ? 'dark' : theme, "&startTime=").concat(startDate ? (0, _moment["default"])(startDate).format('YYYY-MM-DD 00:00:00') : '', "&endTime=").concat(endDate ? (0, _moment["default"])(endDate).format('YYYY-MM-DD 23:59:59') : '');
    }
    if (type === 'staff') {
      src = "".concat(prefix, "/carHistory/#/staffIndex?staffId=").concat(id, "&theme=").concat(source === 'business' ? 'light' : 'dark');
    }
    if (frameParams) {
      var param = [];
      for (var key in frameParams) {
        param.push("".concat(key, "=").concat(frameParams[key] || ''));
      }
      if (param.length > 0) {
        src = "".concat(src, "&").concat(param.join('&'));
      }
    }
    setIframeModalInfo({
      title: type === 'staff' ? '人员轨迹' : '车辆轨迹',
      visible: true,
      src: src
    });
  };
  var chartFontColor = theme === 'light' ? '#000' : '#fff';
  var contentWidth;
  var modalTop = top;
  var clientWidth = document.body.clientWidth;
  if (wrType === 'new' && wrVer === '1.0') {
    contentWidth = 1500;
  } else if (clientWidth > 1440) {
    contentWidth = width;
  } else if (clientWidth > 1366) {
    modalTop = 0;
    contentWidth = 1352;
  } else {
    modalTop = 0;
    contentWidth = '100%';
  }
  var value = (0, _react.useMemo)(function () {
    return {
      theme: theme,
      chartFontColor: chartFontColor,
      chartColor: _config.chartColor,
      startDate: startDate,
      endDate: endDate,
      date: date,
      mapInfo: mapInfo,
      tabPosition: tabPosition,
      contentStyle: contentStyle
    };
  }, [theme, chartFontColor, _config.chartColor, startDate, endDate, date, mapInfo, tabPosition, contentStyle]);
  return !visible ? null : (/*#__PURE__*/_react["default"].createElement(_vtxThemeProvider["default"], {
    value: value
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "vtx-business-modal-wrap ".concat(theme)
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "mask"
  }), /*#__PURE__*/_react["default"].createElement("div", {
    className: "vtx-business-modal ".concat(theme, " ").concat(tabPosition),
    style: Object.assign({
      width: contentWidth,
      top: modalTop,
      marginLeft: left === 0 ? 'unset' : contentWidth === '100%' ? '-50%' : "-".concat(Number(contentWidth) / 2, "px"),
      left: left
    }, modalHeight ? {
      height: modalHeight,
      maxHeight: modalHeight,
      minHeight: modalHeight
    } : {})
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "vtx-business-modal--head ".concat(theme)
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "vtx-business-modal--head-title ".concat(theme)
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "vtx-business-modal--head-title-bg ".concat(theme)
  }), title, subTitle, newDetail.panoramaLinkAddress && (/*#__PURE__*/_react["default"].createElement("img", {
    style: {
      width: '28px',
      height: '28px',
      marginLeft: '20px'
    },
    src: require('./imgs/panoramaLink.png'),
    alt: "panoramaLink"
  })), newDetail.facilityGradeName && (/*#__PURE__*/_react["default"].createElement("span", {
    className: "gradeTip"
  }, newDetail.facilityGradeName)), newDetail.facilityClassName && (/*#__PURE__*/_react["default"].createElement("span", {
    className: "classTip"
  }, newDetail.facilityClassName)), wrVer && newDetail.id && (/*#__PURE__*/_react["default"].createElement("span", {
    style: {
      color: '#faad14'
    }
  }, "\u2003", /*#__PURE__*/_react["default"].createElement(_antd.Rate, {
    disabled: true,
    allowHalf: true,
    value: newDetail.score || 0,
    style: {
      color: '#faad14 '
    }
  }), /*#__PURE__*/_react["default"].createElement("span", {
    className: "ant-rate-text"
  }, newDetail.score || 0)))), /*#__PURE__*/_react["default"].createElement("div", {
    className: "vtx-business-modal--head-btns"
  }, (type === 'car' || type === 'staff') && (/*#__PURE__*/_react["default"].createElement("div", {
    className: "vtx-business-modal--head-btn ".concat(theme),
    onClick: function onClick() {
      var source = '';
      if (actionType == 'ACTION_JXH') {
        source = 'JXH';
      }
      clickTract({
        source: source
      });
    }
  }, /*#__PURE__*/_react["default"].createElement("img", {
    src: theme === 'dark' ? _track["default"] : theme === 'blue' ? _track_blue["default"] : _track_light["default"],
    style: theme === 'blue' || theme === 'light' ? {
      height: 14,
      width: 14
    } : {}
  }), "\u5386\u53F2\u8F68\u8FF9")), showCollect && theme !== 'light' && (/*#__PURE__*/_react["default"].createElement("div", {
    className: "vtx-business-modal--head-btn ".concat(theme),
    onClick: function onClick() {
      toggleCollect();
    }
  }, /*#__PURE__*/_react["default"].createElement("img", {
    src: theme === 'dark' ? _collect["default"] : theme === 'blue' ? _collectBlue["default"] : _collect_light["default"],
    style: theme === 'blue' ? {
      height: 14,
      width: 14
    } : {}
  }), hasCollect ? '已收藏' : '收藏')), /*#__PURE__*/_react["default"].createElement("img", {
    className: "close-btn ".concat(theme),
    src: theme === 'dark' ? _closeDark["default"] : theme === 'blue' ? _closeBlueNew["default"] : _close["default"],
    alt: "",
    onClick: function onClick() {
      return onCancel && onCancel();
    }
  }))), /*#__PURE__*/_react["default"].createElement("div", {
    className: "vtx-business-modal--content-".concat(tabPosition, " ").concat(theme)
  }, (tabs === null || tabs === void 0 ? void 0 : tabs.length) > 1 && tabPosition == 'top' && (theme == 'light' || theme == 'blue') && (/*#__PURE__*/_react["default"].createElement("div", {
    className: "vtx-modal-tabs-".concat(tabPosition, " ").concat(theme, " ")
  }, tabs.map(function (ele, index) {
    var _a, _b;
    return /*#__PURE__*/_react["default"].createElement("div", {
      key: index,
      className: (0, _classnames["default"])("vtx-modal-tabs--tab", _defineProperty({}, "vtx-modal-tabs--tab_active", tabKey === ele.key), theme),
      onClick: function onClick() {
        setTabKey(ele.key);
        onTabsChange === null || onTabsChange === void 0 ? void 0 : onTabsChange(ele.key);
      }
    }, /*#__PURE__*/_react["default"].createElement("img", {
      src: ((_a = _config.tabsImgBlueList.find(function (item) {
        return item.title == ele.title;
      })) === null || _a === void 0 ? void 0 : _a[tabKey === ele.key ? "img_".concat(theme, "_active") : "img_".concat(theme)]) || ((_b = _config.tabsImgBlueList.find(function (item) {
        return item.title == '默认';
      })) === null || _b === void 0 ? void 0 : _b[tabKey === ele.key ? "img_".concat(theme, "_active") : "img_".concat(theme)])
    }), /*#__PURE__*/_react["default"].createElement("div", {
      className: "vtx-modal-tabs--title ".concat(theme)
    }, ele.title));
  }))), /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat((tabs === null || tabs === void 0 ? void 0 : tabs.length) > 1 ? 'vtx-business-modal--main' : 'vtx-business-modal--main-notab', " ").concat(tabPosition),
    style: Object.assign(Object.assign({}, contentStyle), modalHeight ? {
      height: modalHeight,
      maxHeight: modalHeight,
      minHeight: modalHeight
    } : {})
  }, /*#__PURE__*/_react["default"].createElement("div", {
    ref: contentRef
  }, contents[tabKey])), (tabs === null || tabs === void 0 ? void 0 : tabs.length) > 1 && tabPosition == 'right' && (theme == 'light' || theme == 'blue') && (/*#__PURE__*/_react["default"].createElement("div", {
    className: "vtx-modal-tabs-".concat(tabPosition, " ").concat(theme)
  }, tabs.map(function (ele, index) {
    var _a, _b;
    return /*#__PURE__*/_react["default"].createElement("div", {
      key: index,
      className: (0, _classnames["default"])("vtx-modal-tabs--tab", _defineProperty({}, "vtx-modal-tabs--tab_active", tabKey === ele.key), theme),
      onClick: function onClick() {
        setTabKey(ele.key);
        onTabsChange === null || onTabsChange === void 0 ? void 0 : onTabsChange(ele.key);
      }
    }, /*#__PURE__*/_react["default"].createElement("img", {
      src: ((_a = _config.tabsImgBlueList.find(function (item) {
        return item.title == ele.title;
      })) === null || _a === void 0 ? void 0 : _a[tabKey === ele.key ? "img_".concat(theme, "_active") : "img_".concat(theme)]) || ((_b = _config.tabsImgBlueList.find(function (item) {
        return item.title == '默认';
      })) === null || _b === void 0 ? void 0 : _b[tabKey === ele.key ? "img_".concat(theme, "_active") : "img_".concat(theme)])
    }), /*#__PURE__*/_react["default"].createElement("div", {
      className: "vtx-modal-tabs--title ".concat(theme)
    }, ele.title));
  }))), (tabs === null || tabs === void 0 ? void 0 : tabs.length) > 1 && tabPosition == 'bottom' && (theme == 'light' || theme == 'blue') && (/*#__PURE__*/_react["default"].createElement("div", {
    className: "vtx-modal-tabs-".concat(tabPosition, " ").concat(theme, " ")
  }, tabs.map(function (ele, index) {
    var _a, _b;
    return /*#__PURE__*/_react["default"].createElement("div", {
      key: index,
      className: (0, _classnames["default"])("vtx-modal-tabs--tab", _defineProperty({}, "vtx-modal-tabs--tab_active", tabKey === ele.key), theme),
      onClick: function onClick(e) {
        e.stopPropagation();
        setTabKey(ele.key);
        onTabsChange === null || onTabsChange === void 0 ? void 0 : onTabsChange(ele.key);
      }
    }, /*#__PURE__*/_react["default"].createElement("img", {
      src: ((_a = _config.tabsImgBlueList.find(function (item) {
        return item.title == ele.title;
      })) === null || _a === void 0 ? void 0 : _a[tabKey === ele.key ? "img_".concat(theme, "_active") : "img_".concat(theme)]) || ((_b = _config.tabsImgBlueList.find(function (item) {
        return item.title == '默认';
      })) === null || _b === void 0 ? void 0 : _b[tabKey === ele.key ? "img_".concat(theme, "_active") : "img_".concat(theme)])
    }), /*#__PURE__*/_react["default"].createElement("div", {
      className: "vtx-modal-tabs--title ".concat(theme)
    }, ele.title));
  }))), (tabs === null || tabs === void 0 ? void 0 : tabs.length) > 1 && theme == 'dark' && (/*#__PURE__*/_react["default"].createElement("div", {
    className: "vtx-modal-tabs ".concat(theme)
  }, tabs.map(function (ele, index) {
    return /*#__PURE__*/_react["default"].createElement("div", {
      key: index,
      className: (0, _classnames["default"])("vtx-modal-tabs--tab", _defineProperty({}, "vtx-modal-tabs--tab_active ".concat(theme), tabKey === ele.key)),
      onClick: function onClick() {
        setTabKey(ele.key);
        onTabsChange === null || onTabsChange === void 0 ? void 0 : onTabsChange(ele.key);
      }
    }, ele.title);
  })))))), /*#__PURE__*/_react["default"].createElement(_vmIframeModal["default"], Object.assign({}, iframeModalInfo, {
    theme: theme,
    onCancel: function onCancel() {
      return setIframeModalInfo({
        visible: false
      });
    }
  }))));
};
var _default = exports["default"] = VtxBaseModal;
//# sourceMappingURL=index.js.map
