import cx from "classnames";
import React, { AnchorHTMLAttributes } from "react";

interface SkipLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
  href?: string;
}

const CLASS_ROOT = "skip-link";

const SkipLink: React.FC<SkipLinkProps> = ({
  href = "#maincontent",
  className,
  ...props
}) => {
  const classes = cx(CLASS_ROOT, className);
  return (
    <a href={href} className={classes} {...props}>
      Preskočiť na hlavný obsah
    </a>
  );
};

SkipLink.displayName = "SkipLink";

export { SkipLink };
