"use strict";var e=require("react/jsx-runtime"),t=require("react"),o=require("classnames"),r=require("@material-ui/core"),i=require("@material-ui/icons"),a=require("../IconButton/index.js"),n=require("./RealTimeSidebarContext.js"),s=require("./enums.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=d(o),c=r.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 u=t.memo((function(o){var r=o.onSidebarOpened,d=o.onSidebarClosed,u=c(),b=t.useContext(n),p=b.isSidebarOpen,x=b.orientation,m=b.handleOpenCloseDialog;return e.jsx("div",{className:l.default(u.rtSidebarFooter,x),"data-testid":"sidebar_footer",children:p?e.jsxs("div",{className:l.default(u.rtSidebarFooterActions,x),children:[e.jsx(a,{"data-testid":"sidebar_close_button",onClick:d,className:u.actionButton,children:x===s.ORIENTATIONS.vertical?e.jsx(i.ChevronRight,{}):e.jsx(i.KeyboardArrowUp,{className:u.rtSidebarFooterIcon})}),x===s.ORIENTATIONS.horizontal&&e.jsx(a,{color:"primary",tooltipProps:{title:"Add"},onClick:function(){return m(!0)},className:u.actionButton,children:e.jsx(i.Add,{})})]}):e.jsx(a,{onClick:r,"data-testid":"sidebar_open_button",classes:{root:u.actionButton},className:l.default(u.closedButton),children:x===s.ORIENTATIONS.vertical?e.jsx(i.ChevronLeft,{}):e.jsx(i.KeyboardArrowDown,{})})})}));module.exports=u;
