"use strict";var stringUtil=require("./stringUtil-dea69be9.js"),mobxReact=require("mobx-react"),React=require("react"),index=require("./index-1426f57c.js");function _interopDefaultLegacy(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./MapEditView-95e9569e.js"),require("react-dom"),require("react-dnd-html5-backend"),require("classnames"),require("perfect-scrollbar"),require("react-virtualized"),require("@loadable/component"),require("@tanem/react-nprogress"),require("dayjs"),require("sql-formatter-fork"),require("axios"),require("superstruct"),require("lodash"),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("ali-oss"),require("minio"),require("lz-string"),require("spark-md5"),require("js-cookie"),require("is-email"),require("is-uuid"),require("is-url"),require("@syncpoint/wkx"),require("buffer"),require("@turf/turf"),require("@mapbox/polylabel"),require("turf-multipolygon"),require("turf-polygon"),require("gcoord"),require("eventemitter2"),require("anymatch"),require("crypto"),require("uuid"),require("react-contextmenu"),require("./isNil-cac51af7.js"),require("./orderBy-f3ba2335.js"),require("coordtransform"),require("./compact-e8934448.js"),require("react-use"),require("./useDataValue-9ef54772.js"),require("./trim-77ee23fd.js"),require("./VirtualizedTable-cb04fd37.js"),require("ali-react-table-fork"),require("./Transfer-9303bbdf.js"),require("./useMount-1cf8cee2.js"),require("maptalks"),require("js-beautify"),require("jquery"),require("geobuf"),require("./index-5871dd9e.js"),require("./index-54965385.js"),require("./index-1e562c2a.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("decamelize"),require("rbush"),require("qs"),require("maptalks.snap"),require("./index-debb7be7.js"),require("./index-e580d738.js"),require("./index-84574b4f.js"),require("./index-30d1ad06.js"),require("./index-74b25b71.js"),require("stream"),require("./ResizeObserver.es-1ce40604.js");var React__default=_interopDefaultLegacy(React),CollaborationDetailItem=function(e){e=e.it;return React__default.default.createElement("div",{className:"".concat(index.prefixCls$1,"-detail-item")},React__default.default.createElement("div",{className:"".concat(index.prefixCls$1,"-detail-item-label")},e.label),React__default.default.createElement("div",{className:"".concat(index.prefixCls$1,"-detail-item-value")},e.value))},CollaborationDetail=mobxReact.observer(function(){var e=index.thumbListContext.getContext(),e=React__default.default.useContext(e).store,r=e.appUsers,i=e.displayTableData,a=e.packageItem,e=React__default.default.useMemo(function(){var e=stringUtil.find_1(r,function(e){return a.userId===e.id});return[{label:index.i18n$1.collaboration.dataName,value:a.name},{label:index.i18n$1.collaboration.dataType,value:index.i18n$1.collaboration.collaborationData},{label:index.i18n$1.collaboration.initiatingUser,value:null!==(e=null==e?void 0:e.title)&&void 0!==e?e:"-"}]},[r,a.name,a.userId]),t=React__default.default.useMemo(function(){return stringUtil.map_1(i,function(e){var r=e.condition,e=e.permission,i=e===index.ConditionPermissionEnum.editable?index.i18n$1.collaboration.editable:index.i18n$1.collaboration.onlyView,e=e===index.ConditionPermissionEnum.editable?"green-900":"yellow-900";return[{label:index.i18n$1.collaboration.condition,value:r},{label:index.i18n$1.collaboration.dataPermission,value:React__default.default.createElement(stringUtil.Tag,{tag:i,color:e})}]})},[i]);return React__default.default.createElement("div",{className:"".concat(index.prefixCls$1,"-detail")},React__default.default.createElement("div",{className:"".concat(index.prefixCls$1,"-detail-items")},stringUtil.map_1(e,function(e){return React__default.default.createElement(CollaborationDetailItem,{it:e})})),stringUtil.map_1(t,function(e){return React__default.default.createElement("div",{className:"".concat(index.prefixCls$1,"-detail-items")},stringUtil.map_1(e,function(e){return React__default.default.createElement(CollaborationDetailItem,{it:e})}))}))});CollaborationDetail.displayName="CollaborationDetail",exports.default=CollaborationDetail;
