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