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