import classnames from 'classnames';
import ElectionLink from "../../../election/ElectionLink/index.js";
import { prependContext } from "../../../../utils/tracking/index.js";
import classes from './styles.module.scss';
const Link = function Link(props) {
  const {
    node,
    href,
    className,
    children,
    tracking,
    ...restProps
  } = props;
  const trackingOpts = {
    context: prependContext({
      prefix: 'ElectionMarkdown',
      context: tracking?.context
    })
  };
  return <ElectionLink to={href} className={classnames(classes.link, className)} tracking={trackingOpts} {...restProps}>
      {children}
    </ElectionLink>;
};
export default Link;