import { SiteNavigationItemProps, SiteNavigationProps } from "./types"; import clsx from 'clsx'; const Item = ({ children, isCurrent = false, href, linkComponent }: SiteNavigationItemProps) => { const classNames = ['ds_site-navigation__link']; let ariaCurrent: React.AriaAttributes["aria-current"]; if (isCurrent) { classNames.push('ds_current'); ariaCurrent = 'page'; } const classNamesString = clsx(classNames); function processChildren(children: React.ReactNode) { if (linkComponent) { return linkComponent({ className: classNamesString, href, children }); } else if (href) { return {children}; } else { return {children}; } } return (