export * from '@digigov/react-core/NavListItemLinkBase';
import React from 'react';
import {
  NavListItemLinkBase,
  NavListItemLinkBaseProps,
} from '@digigov/react-core/NavListItemLinkBase';
import { Link } from '@digigov/ui/navigation/Link';

export interface NavListItemLinkProps extends NavListItemLinkBaseProps {}

export const NavListItemLink = React.forwardRef<
  HTMLAnchorElement,
  NavListItemLinkProps
>(function NavListItemLink({ children, ...props }, ref) {
  return (
    <NavListItemLinkBase as={Link} ref={ref} {...props}>
      {children}
    </NavListItemLinkBase>
  );
});

export default NavListItemLink;
