"use strict";var stringUtil=require("./stringUtil-1ce2e674.js"),React=require("react"),index=require("./index-6b81e500.js"),mobxReact=require("mobx-react"),dayjs=(require("./MapEditView-677fbbe0.js"),require("react-dom"),require("react-dnd-html5-backend"),require("classnames"),require("perfect-scrollbar"),require("react-virtualized"),require("dayjs")),lodash=require("lodash");function _interopDefaultLegacy(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@loadable/component"),require("@tanem/react-nprogress"),require("sql-formatter-fork"),require("axios"),require("superstruct"),require("chroma-js"),require("localforage"),require("react-draggable"),require("react-rnd"),require("react-is"),require("ahooks"),require("rc-menu"),require("mobx"),require("react-beautiful-dnd"),require("lz-string"),require("ali-oss"),require("minio"),require("url-join"),require("spark-md5"),require("js-cookie"),require("is-email"),require("is-uuid"),require("is-url"),require("eventemitter2"),require("@syncpoint/wkx"),require("buffer"),require("@turf/turf"),require("@mapbox/polylabel"),require("turf-multipolygon"),require("turf-polygon"),require("gcoord"),require("anymatch"),require("crypto"),require("@datlas/dm-rc"),require("uuid"),require("react-use"),require("./SimpleCrossTable-5e6c22c0.js"),require("ali-react-table-fork"),require("react-contextmenu"),require("./orderBy-3f009a04.js"),require("coordtransform"),require("./compact-4c2730f3.js"),require("./useDataValue-c9c0c1f5.js"),require("./Transfer-71c9bbca.js"),require("maptalks"),require("js-beautify"),require("jquery"),require("geobuf"),require("./index-08da175b.js"),require("./index-6d063071.js"),require("./index-c5ed5a65.js"),require("jszip"),require("file-saver"),require("screenfull"),require("array-move"),require("turf-multilinestring"),require("copy-to-clipboard"),require("maptalks.three"),require("ajv"),require("turf-point"),require("rbush"),require("./index-a545bee5.js"),require("./index-05c22d1a.js"),require("./index-1c1fae04.js"),require("./index-a75cebfa.js"),require("./index-901e1bbd.js"),require("stream");var React__default=_interopDefaultLegacy(React),dayjs__default=_interopDefaultLegacy(dayjs),FORMAT="YYYY/hh/mm",CollaborationSide=mobxReact.observer(function(e){var t=e.onClose,e=index.thumbListContext.getContext(),e=React__default.default.useContext(e).store,r=e.totalCount,a=e.packageItem,i=e.deleteAllCol,l=e.onClearWillDeleteCollaborateInfo,e=a.name,u=a.geometryType,u=void 0===u?"point":u,n=a.createTime,a=a.updateTime,r=[{label:index.i18n$1.collaboration.type,value:stringUtil.GEO_TYPES_LABEL_MAP[u]},{label:index.i18n$1.collaboration.rowCount,value:r},{label:index.i18n$1.collaboration.createTime,value:n?dayjs__default.default(1e3*n).format(FORMAT):"-"},{label:index.i18n$1.collaboration.updateTime,value:a?dayjs__default.default(1e3*a).format(FORMAT):"-"}],n=stringUtil.GEO_TYPE_THUMB_MAP[u],a=React.useCallback(function(){return stringUtil.__awaiter(void 0,void 0,void 0,function(){var r,a;return stringUtil.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,i()];case 1:return e.sent(),l(),t(),[3,3];case 2:return r=e.sent(),console.log("error",r),a=null!==(a=lodash.get(r,"response.message"))&&void 0!==a?a:lodash.get(r,"response.data.message"),stringUtil.toastApi.error(null!=a?a:index.i18n$1.collaboration.deleteCollaborationError),[3,3];case 3:return[2]}})})},[i,l,t]);return React__default.default.createElement("div",{className:index.prefixCls$1+"-side"},React__default.default.createElement("div",{className:index.prefixCls$1+"-side-main"},React__default.default.createElement("div",{className:index.prefixCls$1+"-side-img"},React__default.default.createElement(stringUtil.Icon$1,{icon:n})),React__default.default.createElement("div",{className:index.prefixCls$1+"-side-title"},React__default.default.createElement(stringUtil.Tooltip,{title:null!==(u=""+e+index.i18n$1.collaboration.package)?u:"-"},React__default.default.createElement("span",null,null!==(n=""+e+index.i18n$1.collaboration.package)?n:"-"))),stringUtil.map_1(r,function(e){return React__default.default.createElement("div",{className:index.prefixCls$1+"-side-item",key:e.label},React__default.default.createElement("div",{className:index.prefixCls$1+"-side-item-label"},e.label),React__default.default.createElement("div",{className:index.prefixCls$1+"-side-item-value"},e.value))})),React__default.default.createElement(stringUtil.Button,{type:"assist-bg",block:!0,disabled:!0},index.i18n$1.collaboration.batchStartCollaborationPackage),React__default.default.createElement(stringUtil.Button,{type:"assist-bg",block:!0,onClick:a},index.i18n$1.collaboration.deleteCollaboration))});CollaborationSide.displayName="Collaboration",exports.default=CollaborationSide;
