import{r as e,_ as o,j as n,h as r}from"./react-B_SyE9nW.js";import{_ as t}from"./history-CBi_mSPs.js";import{a,g as i,bV as s,b as l,s as c,h as u,c as d,aI as m,f as p,e as b}from"./index-CGGskqVP.js";import{d as y}from"./index-CdMAEzxT.js";function f(e){return i("MuiLink",e)}const h=a("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),x={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},v=({theme:e,ownerState:o})=>{const n=(e=>x[e]||e)(o.color),r=s(e,`palette.${n}`,!1)||o.color,t=s(e,`palette.${n}Channel`);return"vars"in e&&t?`rgba(${t} / 0.4)`:l(r,.4)},g=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],w=c(y,{name:"MuiLink",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:n}=e;return[o.root,o[`underline${u(n.underline)}`],"button"===n.component&&o.button]}})((({theme:e,ownerState:o})=>t({},"none"===o.underline&&{textDecoration:"none"},"hover"===o.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===o.underline&&t({textDecoration:"underline"},"inherit"!==o.color&&{textDecorationColor:v({theme:e,ownerState:o})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===o.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${h.focusVisible}`]:{outline:"auto"}}))),S=e.forwardRef((function(a,i){const s=d({props:a,name:"MuiLink"}),{className:l,color:c="primary",component:y="a",onBlur:h,onFocus:v,TypographyClasses:S,underline:k="always",variant:j="inherit",sx:C}=s,V=o(s,g),{isFocusVisibleRef:A,onBlur:D,onFocus:$,ref:F}=m(),[L,M]=e.useState(!1),R=p(i,F),B=t({},s,{color:c,component:y,focusVisible:L,underline:k,variant:j}),N=(e=>{const{classes:o,component:n,focusVisible:r,underline:t}=e,a={root:["root",`underline${u(t)}`,"button"===n&&"button",r&&"focusVisible"]};return b(a,f,o)})(B);return n.jsx(w,t({color:c,className:r(N.root,l),classes:S,component:y,onBlur:e=>{D(e),!1===A.current&&M(!1),h&&h(e)},onFocus:e=>{$(e),!0===A.current&&M(!0),v&&v(e)},ref:R,ownerState:B,variant:j,sx:[...Object.keys(x).includes(c)?[]:[{color:c}],...Array.isArray(C)?C:[C]]},V))}));export{S as L};