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