"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[9001],{49001:(e,r,o)=>{o.r(r),o.d(r,{default:()=>f});var t=o(5057),a=o(47206),n=o(44005),l=o(98790),i=o(92649),s=o(9847),d=o(31808),c=o(41322),u=o(82160);const g=(0,u.Z)("div",{target:"e11k5jya2"})((()=>({display:"flex",flexDirection:"column"})),""),p=(0,u.Z)("a",{target:"e11k5jya1"})((e=>{let{disabled:r,isCurrentPage:o,fluidWidth:t,theme:a}=e;return{textDecoration:"none",width:"number"==typeof t?`${t}px`:"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:a.spacing.sm,borderRadius:a.radii.default,paddingLeft:a.spacing.sm,paddingRight:a.spacing.sm,marginTop:a.spacing.threeXS,marginBottom:a.spacing.threeXS,lineHeight:a.lineHeights.menuItem,backgroundColor:o?a.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:o?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.borderColor,backgroundColor:a.colors.transparent,color:a.colors.fadedText40,cursor:"not-allowed","&:hover":{color:a.colors.fadedText40,backgroundColor:a.colors.transparent}}:{}}}),""),h=(0,u.Z)("span",{target:"e11k5jya0"})((e=>{let{disabled:r,theme:o}=e;return{color:o.colors.bodyText,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell",...r?{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}:{}}}),"");var b=o(96266);const f=function(e){const{onPageChange:r,currentPageScriptHash:o}=t.useContext(d.E),u=t.useContext(c.Z),{colors:f}=(0,a.u)(),{disabled:x,element:k,width:C}=e,m={width:C},v=function(e,r){return!(null!==e||!r)||!(null===e&&!r)&&!0===e}(k.useContainerWidth,u),w=o===k.pageScriptHash;return(0,b.jsx)("div",{className:"stPageLink","data-testid":"stPageLink",style:m,children:(0,b.jsx)(i.t,{help:k.help,placement:l.u.TOP_RIGHT,children:(0,b.jsx)(g,{children:(0,b.jsxs)(p,{"data-testid":"stPageLink-NavLink",disabled:x,isCurrentPage:w,fluidWidth:!!v&&C,href:k.page,target:k.external?"_blank":"",rel:"noreferrer",onClick:e=>{k.external?x&&e.preventDefault():(e.preventDefault(),x||r(k.pageScriptHash))},children:[k.icon&&(0,b.jsx)(n.p,{size:"lg",color:f.bodyText,iconValue:k.icon}),(0,b.jsx)(h,{disabled:x,children:(0,b.jsx)(s.ZP,{source:k.label,allowHTML:!1,isLabel:!0,boldLabel:w,largerLabel:!0,disableLinks:!0})})]})})})})}}}]);