import { Link, SxProps, Theme, Typography } from "@mui/material";


interface Props {
    text: string;
    linkHref: string;
    isHighlighted?: boolean;
    sx?: SxProps<Theme>;
}

export default function UnderlinedLink({ text, linkHref, isHighlighted = false, sx }: Props) {

    return (
        <Link
            href={linkHref}
            color={isHighlighted ? "text.primary" : "text.secondary"}
            underline="none"
            sx={{
                borderBottom: isHighlighted ? "1px solid #ffffff" : "1px solid #7E2AEA",
                pb: "3px",
                ...sx,
            }}
        >
            <Typography variant="medium">{text}</Typography>
        </Link>
    );
}