"use strict";var e=require('./../../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),i=require("react"),r=require("react-draggable-list"),n=require("@material-ui/core"),a=require("@material-ui/icons"),s=require("../../IconButton/index.js"),o=require("./RealTimeBox.js"),l=require("../RealTimeSidebarContext.js"),u=require("../enums.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=d(r),x=n.makeStyles((function(){return{boxListVertical:{padding:"10px 0 16px",overflowX:"hidden"},rtBoxListHorizontal:{display:"flex",flexWrap:"wrap"},cTpRtBoxAddButtonContainer:{marginTop:8,textAlign:"center"}}}));var m=i.memo((function(r){var n=r.sourceArray,d=r.findSource,m=x(),p=i.useContext(l),g=p.onAppSettingChange,f=p.appSettings,j=p.assetKey,_=p.orientation,v=p.realTimeTypes,y=p.setting,q=p.handleOpenCloseDialog;return t.jsx(t.Fragment,{children:_===u.ORIENTATIONS.vertical?t.jsxs("div",e.__assign({className:m.boxListVertical},{children:[t.jsx(c.default,{list:n,itemKey:function(e){return e.key},template:o,padding:0,unsetZIndex:!0,container:function(){return document.body},onMoveEnd:function(t){var i,r=t.map((function(e){return e.key}));g("rtValuesSetting",e.__assign(e.__assign({},f.rtValuesSetting),((i={})[j]=r,i)))}}),t.jsx("div",e.__assign({className:m.cTpRtBoxAddButtonContainer},{children:t.jsx(s,e.__assign({"data-testid":"addRealTimeValuesButton",color:"primary",tooltipProps:{title:"Add"},onClick:q},{children:t.jsx(a.Add,{})}))}))]})):t.jsx("div",e.__assign({className:m.rtBoxListHorizontal},{children:y.map((function(e){return t.jsx(o,{isDraggable:!1,item:d(e,v)},"".concat(e))}))}))})}));module.exports=m;
