import { ActionLink } from '@/components/actions/ActionLink';
import styles from './SectionNavigation.module.css';

export interface SectionNavigationItem {
  id: string;
  label: string;
  href: string;
  current?: boolean;
}

export function SectionNavigation({
  label,
  items,
}: {
  label: string;
  items: SectionNavigationItem[];
}) {
  return (
    <nav aria-label={label} className={styles.nav}>
      <ul>
        {items.map((item) => (
          <li key={item.id}>
            <ActionLink
              href={item.href}
              variant="navigation"
              aria-current={item.current ? 'location' : undefined}
            >
              {item.label}
            </ActionLink>
          </li>
        ))}
      </ul>
    </nav>
  );
}
