import{o as e}from"./rolldown-runtime.C0FnF6B9.js";import{r as t}from"./emotion-is-prop-valid.esm.CuYlOKOk.js";import{a as n,i as r}from"./emotion-styled.browser.esm.BYv_Qzcq.js";import{r as i}from"./StreamlitMarkdown.BYA62LKI.js";import{n as a}from"./Icon.BwNwD-ho.js";import{t as o}from"./useEmotionTheme.Dmt_qJ4x.js";import{n as s,t as c}from"./Tooltip.CcubhKj6.js";import{t as l}from"./styled-components.BjKbfR5p.js";import{t as u}from"./BaseButton.eTlHCX_j.js";import{f as d,m as f}from"./ErrorElement.Bn6KKjq6.js";import{t as p}from"./extends.CvVTau-c.js";import{t as m}from"./index.esm.BUFMYQEK.js";var h=e(t()),g=h.forwardRef(function(e,t){return h.createElement(m,p({iconAttrs:{fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`},iconVerticalAlign:`middle`,iconViewBox:`0 0 24 24`},e,{ref:t}),h.createElement(`path`,{fill:`none`,d:`M0 0h24v24H0V0z`}),h.createElement(`path`,{d:`M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z`}))});g.displayName=`Fullscreen`;var _=h.forwardRef(function(e,t){return h.createElement(m,p({iconAttrs:{fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`},iconVerticalAlign:`middle`,iconViewBox:`0 0 24 24`},e,{ref:t}),h.createElement(`path`,{fill:`none`,d:`M0 0h24v24H0V0z`}),h.createElement(`path`,{d:`M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z`}))});_.displayName=`FullscreenExit`;function v({label:e,show_label:t,icon:d,onClick:f}){let p=o(),m=t?e:``;return r(`div`,{"data-testid":`stElementToolbarButton`,children:r(s,{content:r(i,{source:e,allowHTML:!1,style:{fontSize:p.fontSizes.sm}}),placement:c.TOP,onMouseEnterDelay:1e3,closeDelay:0,dismissOnClick:!0,interactive:!1,inline:!0,children:n(u,{onClick:e=>{f&&f(),e.stopPropagation()},kind:l.ELEMENT_TOOLBAR,"aria-label":e,children:[d&&r(a,{content:d,size:`md`,testid:`stElementToolbarButtonIcon`}),m&&r(`span`,{children:m})]})})})}var y=({onExpand:e,onCollapse:t,isFullScreen:i,locked:a,children:o,target:s,disableFullscreenMode:c})=>r(f,{className:`stElementToolbar`,"data-testid":`stElementToolbar`,locked:a||i,target:s,children:n(d,{"data-testid":`stElementToolbarButtonContainer`,children:[o,e&&!c&&!i&&r(v,{label:`Fullscreen`,icon:g,onClick:()=>e()}),t&&!c&&i&&r(v,{label:`Close fullscreen`,icon:_,onClick:()=>t()})]})});export{v as n,y as t};