(window.charts_bundle_jsonpfunction=window.charts_bundle_jsonpfunction||[]).push([[4],{37:function(e,t,o){"use strict";o.r(t),o.d(t,"LegendToggle",(function(){return u}));var n=o(1),s=o(5),l=o(4),i=o(0),c={name:"kth5c3",styles:"left:auto;bottom:auto;right:0;top:0"};const a=({onClick:e,showLegend:t,legendPosition:o})=>{const{euiTheme:a}=Object(l.useEuiTheme)(),u=Object(n.useMemo)((()=>Object(i.css)("position:absolute;bottom:0;left:0;z-index:1;margin:",a.size.xs,";","")),[a.size.xs]),g=Object(n.useMemo)((()=>Object(i.css)("background-color:",a.colors.lightestShade,";","")),[a.colors.lightestShade]),d=Object(n.useMemo)((()=>c),[]);return Object(i.jsx)(l.EuiButtonIcon,{type:"button",iconType:"list",color:"text",onClick:e,css:[u,t?g:null,["left","bottom"].includes(o)?d:null,"",""],"aria-label":s.i18n.translate("charts.legend.toggleLegendButtonAriaLabel",{defaultMessage:"Toggle legend"}),"aria-expanded":t,isSelected:t,"data-test-subj":"vislibToggleLegend",title:s.i18n.translate("charts.legend.toggleLegendButtonTitle",{defaultMessage:"Toggle legend"})})},u=Object(n.memo)(a)}}]);