"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(25621),n=t(22704),l=t(68411),i=t(27446),s=t(63730),d=t(66694),c=t(84457),g=t(1515);const p=(0,g.Z)("div",{target:"e11k5jya2"})((e=>{let{}=e;return{display:"flex",flexDirection:"column"}}),""),u=(0,g.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}}:{}}}),""),h=(0,g.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 x=t(40864);const f=function(e){const{onPageChange:r,currentPageScriptHash:t}=o.useContext(d.E),g=o.useContext(c.Z),{colors:f}=(0,a.u)(),{disabled:b,element:k,width:m}=e,C={width:m},w=function(e,r){return!(null!==e||!r)||!(null===e&&!r)&&!0===e}(k.useContainerWidth,g),v=t===k.pageScriptHash;return(0,x.jsx)("div",{className:"row-widget stPageLink","data-testid":"stPageLink",style:C,children:(0,x.jsx)(i.t,{help:k.help,placement:l.u.TOP_RIGHT,children:(0,x.jsx)(p,{children:(0,x.jsxs)(u,{"data-testid":"stPageLink-NavLink",disabled:b,isCurrentPage:v,fluidWidth:!!w&&m,href:k.page,target:k.external?"_blank":"",rel:"noreferrer",onClick:e=>{k.external?b&&e.preventDefault():(e.preventDefault(),b||r(k.pageScriptHash))},children:[k.icon&&(0,x.jsx)(n.p,{size:"lg",color:f.bodyText,iconValue:k.icon}),(0,x.jsx)(h,{disabled:b,children:(0,x.jsx)(s.ZP,{source:k.label,allowHTML:!1,isLabel:!0,boldLabel:v,largerLabel:!0,disableLinks:!0})})]})})})})}}}]);