'use client'; import { forwardRef, HTMLAttributes } from 'react'; import styles from '../minimal-nav.module.css'; export interface NavItem { id: string; label: string; href?: string; onClick?: () => void; active?: boolean; icon?: string; } export interface MinimalNavProps extends HTMLAttributes { /** Navigation items */ items: NavItem[]; /** Orientation */ orientation?: 'horizontal' | 'vertical'; /** Alignment */ align?: 'left' | 'center' | 'right'; /** Show counter/progress */ showCounter?: boolean; /** Counter format */ counterFormat?: (index: number, total: number) => string; /** Show dividers between items */ dividers?: boolean; /** Minimal style */ style?: 'clean' | 'dotted' | 'solid' | 'ghost'; } export const MinimalNav = forwardRef( ( { items, orientation = 'horizontal', align = 'left', showCounter = false, counterFormat = (i, t) => `${i + 1}/${t}`, dividers = false, style: navStyle = 'clean', className, ...props }, ref ) => { const activeIndex = items.findIndex(item => item.active); return ( {showCounter && ( {counterFormat(activeIndex + 1, items.length)} )} {items.map((item, index) => ( {item.icon && {item.icon}} {item.label} {item.active && } ))} ); } ); MinimalNav.displayName = 'MinimalNav'; export default MinimalNav;