import{c as l,r as c,L as p,ap as b,j as o,bH as x,bJ as u,b9 as h,bc as f}from"./index-DCNLpqIv.js";const k=l("div",{target:"e11k5jya2"})({name:"b6wrti",styles:"display:flex;flex-direction:column;width:100%"}),m=l("a",{target:"e11k5jya1"})(({disabled:t,isCurrentPage:r,theme:e})=>({textDecoration:"none",width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:e.spacing.sm,borderRadius:e.radii.button,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,marginTop:e.spacing.threeXS,marginBottom:e.spacing.threeXS,lineHeight:e.lineHeights.menuItem,backgroundColor:r?e.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:r?e.colors.darkenedBgMix25:e.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{textDecoration:"none"},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:e.colors.darkenedBgMix15},"@media print":{paddingLeft:e.spacing.none},...t?{borderColor:e.colors.borderColor,backgroundColor:e.colors.transparent,color:e.colors.fadedText40,cursor:"not-allowed","&:hover":{color:e.colors.fadedText40,backgroundColor:e.colors.transparent}}:{}}),""),C=l("span",{target:"e11k5jya0"})(({disabled:t,theme:r})=>({color:r.colors.bodyText,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell",...t?{borderColor:r.colors.borderColor,backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}:{}}),"");function v(t){const{onPageChange:r,currentPageScriptHash:e}=c.useContext(p),{colors:s}=b(),{disabled:n,element:a}=t,i=e===a.pageScriptHash,g=d=>{a.external?n&&d.preventDefault():(d.preventDefault(),n||r(a.pageScriptHash))};return o.jsx("div",{className:"stPageLink","data-testid":"stPageLink",children:o.jsx(x,{help:a.help,placement:u.TOP_RIGHT,containerWidth:!0,children:o.jsx(k,{children:o.jsxs(m,{"data-testid":"stPageLink-NavLink",disabled:n,isCurrentPage:i,href:a.page,target:a.external?"_blank":"",rel:"noreferrer",onClick:g,children:[a.icon&&o.jsx(h,{size:"lg",color:n?s.fadedText40:s.bodyText,iconValue:a.icon}),o.jsx(C,{disabled:n,children:o.jsx(f,{source:a.label,allowHTML:!1,isLabel:!0,boldLabel:i,largerLabel:!0,disableLinks:!0})})]})})})})}const L=c.memo(v);export{L as default};
