"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[4113],{34113:(e,r,t)=>{t.r(r),t.d(r,{default:()=>f});var o=t(66845),a=t(46927),n=t(68411),l=t(27446),i=t(21e3),s=t(66694),d=t(84457),c=t(1515);const g=(0,c.Z)("div",{target:"e11k5jya2"})((e=>{let{}=e;return{display:"flex",flexDirection:"column"}}),""),p=(0,c.Z)("a",{target:"e11k5jya1"})((e=>{let{disabled:r,isCurrentPage:t,fluidWidth:o,theme:a}=e;return{textDecoration:"none",width:"number"==typeof o?"".concat(o,"px"):"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:a.spacing.sm,borderRadius:a.spacing.twoXS,paddingLeft:a.spacing.sm,paddingRight:a.spacing.sm,marginTop:a.spacing.threeXS,marginBottom:a.spacing.threeXS,lineHeight:a.lineHeights.menuItem,backgroundColor:t?a.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:t?a.colors.darkenedBgMix25:a.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{textDecoration:"none"},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:a.colors.darkenedBgMix15},"@media print":{paddingLeft:a.spacing.none},...r?{borderColor:a.colors.fadedText10,backgroundColor:a.colors.transparent,color:a.colors.fadedText40,cursor:"not-allowed","&:hover":{color:a.colors.fadedText40,backgroundColor:a.colors.transparent}}:{}}}),""),u=(0,c.Z)("span",{target:"e11k5jya0"})((e=>{let{disabled:r,theme:t}=e;return{color:t.colors.bodyText,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell",...r?{borderColor:t.colors.fadedText10,backgroundColor:t.colors.transparent,color:t.colors.fadedText40,cursor:"not-allowed"}:{}}}),"");var h=t(40864);const f=function(e){const{onPageChange:r,currentPageScriptHash:t}=o.useContext(s.E),c=o.useContext(d.Z),{disabled:f,element:x,width:b}=e,k={width:b},m=function(e,r){return!(null!==e||!r)||!(null===e&&!r)&&!0===e}(x.useContainerWidth,c),C=t===x.pageScriptHash;return(0,h.jsx)("div",{className:"row-widget stPageLink","data-testid":"stPageLink",style:k,children:(0,h.jsx)(l.t,{help:x.help,placement:n.u.TOP_RIGHT,children:(0,h.jsx)(g,{children:(0,h.jsxs)(p,{"data-testid":"stPageLink-NavLink",disabled:f,isCurrentPage:C,fluidWidth:!!m&&b,href:x.page,target:x.external?"_blank":"",rel:"noreferrer",onClick:e=>{x.external?f&&e.preventDefault():(e.preventDefault(),f||r(x.pageScriptHash))},children:[x.icon&&(0,h.jsx)(a.S,{size:"lg",children:x.icon}),(0,h.jsx)(u,{disabled:f,children:(0,h.jsx)(i.ZP,{source:x.label,allowHTML:!1,isLabel:!0,boldLabel:C,largerLabel:!0,disableLinks:!0})})]})})})})}}}]);