"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[2469],{62469:(o,r,e)=>{e.r(r),e.d(r,{default:()=>h});e(66845);var t=e(81354),a=e(27446),i=e(1515),c=e(35704);function n(o,r){switch(o){case t.V5.XSMALL:return{padding:"".concat(r.spacing.twoXS," ").concat(r.spacing.sm),fontSize:r.fontSizes.sm};case t.V5.SMALL:return{padding:"".concat(r.spacing.twoXS," ").concat(r.spacing.md)};case t.V5.LARGE:return{padding:"".concat(r.spacing.md," ").concat(r.spacing.md)};default:return{padding:"".concat(r.spacing.xs," ").concat(r.spacing.md)}}}const l=(0,i.Z)("a",{target:"e16zdaao2"})((o=>{let{fluidWidth:r,size:e,theme:t}=o;const a="number"==typeof r?"".concat(r,"px"):"100%";return{display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:t.fontWeights.normal,padding:"".concat(t.spacing.xs," ").concat(t.spacing.md),borderRadius:t.radii.lg,minHeight:"38.4px",margin:0,lineHeight:t.lineHeights.base,color:t.colors.primary,textDecoration:"none",width:r?a:"auto",userSelect:"none","&:visited":{color:t.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:"0 0 0 0.2rem ".concat((0,c.DZ)(t.colors.primary,.5))},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...n(e,t)}}),""),s=(0,i.Z)(l,{target:"e16zdaao1"})((o=>{let{theme:r}=o;return{backgroundColor:r.colors.primary,color:r.colors.white,border:"1px solid ".concat(r.colors.primary),"&:hover":{backgroundColor:(0,c._j)(r.colors.primary,.05),color:r.colors.white},"&:active":{backgroundColor:"transparent",color:r.colors.primary},"&:visited:not(:active)":{color:r.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:r.colors.fadedText10,backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}}}),""),d=(0,i.Z)(l,{target:"e16zdaao0"})((o=>{let{theme:r}=o;return{backgroundColor:r.colors.lightenedBg05,color:r.colors.bodyText,border:"1px solid ".concat(r.colors.fadedText10),"&:visited":{color:r.colors.bodyText},"&:hover":{borderColor:r.colors.primary,color:r.colors.primary},"&:active":{color:r.colors.white,borderColor:r.colors.primary,backgroundColor:r.colors.primary},"&:focus:not(:active)":{borderColor:r.colors.primary,color:r.colors.primary},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:r.colors.fadedText10,backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}}}),"");var u=e(40864);const p=function(o){let{kind:r,size:e,disabled:a,fluidWidth:i,children:c,autoFocus:n,href:l,rel:p,target:b,onClick:h}=o,g=s;return r===t.nW.SECONDARY&&(g=d),(0,u.jsx)(g,{kind:r,size:e||t.V5.MEDIUM,fluidWidth:i||!1,disabled:a||!1,autoFocus:n||!1,"data-testid":"baseLinkButton-".concat(r),href:l,target:b,rel:p,onClick:h,tabIndex:a?-1:0,children:c})};var b=e(21e3);const h=function(o){const{disabled:r,element:e,width:i}=o,c={width:i},n="primary"===e.type?t.nW.PRIMARY:t.nW.SECONDARY,l=!e.help||i;return(0,u.jsx)("div",{className:"row-widget stLinkButton","data-testid":"stLinkButton",style:c,children:(0,u.jsx)(a.t,{help:e.help,children:(0,u.jsx)(p,{kind:n,size:t.V5.SMALL,disabled:r,onClick:r=>{o.disabled&&r.preventDefault()},fluidWidth:!!e.useContainerWidth&&l,href:e.url,target:"_blank",rel:"noreferrer","aria-disabled":r,children:(0,u.jsx)(b.ZP,{source:e.label,allowHTML:!1,isLabel:!0,largerLabel:!0,disableLinks:!0})})})})}}}]);