import{jsx as t,jsxs as o}from"react/jsx-runtime";import{memo as e,useContext as r}from"react";import i from"classnames";import{makeStyles as a}from"@material-ui/core";import{ChevronRight as n,KeyboardArrowUp as c,Add as l,ChevronLeft as s,KeyboardArrowDown as d}from"@material-ui/icons";import m from"../IconButton/index.js";import p from"./RealTimeSidebarContext.js";import{ORIENTATIONS as u}from"./enums.js";var b=a((function(t){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(t.palette.background.b5)},"&.horizontal":{top:0}},rtSidebarFooterIcon:{color:t.palette.primary.text6},rtSidebarFooterActions:{display:"flex",paddingLeft:"14px",paddingRight:"5px",alignItems:"center","&.horizontal":{flexDirection:"row-reverse"}},actionButton:{padding:12}}}));var f=e((function(e){var a=e.onSidebarOpened,f=e.onSidebarClosed,h=b(),x=r(p),S=x.isSidebarOpen,g=x.orientation,v=x.handleOpenCloseDialog;return t("div",{className:i(h.rtSidebarFooter,g),"data-testid":"sidebar_footer",children:S?o("div",{className:i(h.rtSidebarFooterActions,g),children:[t(m,{"data-testid":"sidebar_close_button",onClick:f,className:h.actionButton,children:g===u.vertical?t(n,{}):t(c,{className:h.rtSidebarFooterIcon})}),g===u.horizontal&&t(m,{color:"primary",tooltipProps:{title:"Add"},onClick:function(){return v(!0)},className:h.actionButton,children:t(l,{})})]}):t(m,{onClick:a,"data-testid":"sidebar_open_button",classes:{root:h.actionButton},className:i(h.closedButton),children:g===u.vertical?t(s,{}):t(d,{})})})}));export{f as default};
