"use strict";var e=require('./../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),o=require("react"),r=require("classnames"),i=require("@material-ui/core"),a=require("@material-ui/icons"),n=require("../IconButton/index.js"),s=require("./RealTimeSidebarContext.js"),d=require("./enums.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=l(r),u=i.makeStyles((function(e){return{button:{fontSize:14,fontWeight:500},buttonIcon:{fontSize:24,marginRight:8},closedButton:{marginBottom:"50px"},rtSidebarFooter:{position:"absolute",right:0,"&.vertical":{left:0,bottom:0,boxShadow:"16px -16px 16px ".concat(e.palette.background.b5)},"&.horizontal":{top:0}},rtSidebarFooterIcon:{color:e.palette.primary.text6},rtSidebarFooterActions:{display:"flex",paddingLeft:"14px",paddingRight:"5px",alignItems:"center","&.horizontal":{flexDirection:"row-reverse"}},actionButton:{padding:12}}}));var b=o.memo((function(r){var i=r.onSidebarOpened,l=r.onSidebarClosed,b=u(),p=o.useContext(s),x=p.isSidebarOpen,m=p.orientation,f=p.handleOpenCloseDialog;return t.jsx("div",e.__assign({className:c.default(b.rtSidebarFooter,m),"data-testid":"sidebar_footer"},{children:x?t.jsxs("div",e.__assign({className:c.default(b.rtSidebarFooterActions,m)},{children:[t.jsx(n,e.__assign({"data-testid":"sidebar_close_button",onClick:l,className:b.actionButton},{children:m===d.ORIENTATIONS.vertical?t.jsx(a.ChevronRight,{}):t.jsx(a.KeyboardArrowUp,{className:b.rtSidebarFooterIcon})})),m===d.ORIENTATIONS.horizontal&&t.jsx(n,e.__assign({color:"primary",tooltipProps:{title:"Add"},onClick:function(){return f(!0)},className:b.actionButton},{children:t.jsx(a.Add,{})}))]})):t.jsx(n,e.__assign({onClick:i,"data-testid":"sidebar_open_button",classes:{root:b.actionButton},className:c.default(b.closedButton)},{children:m===d.ORIENTATIONS.vertical?t.jsx(a.ChevronLeft,{}):t.jsx(a.KeyboardArrowDown,{})}))}))}));module.exports=b;
