{items.map((item, index) => {
const { scale, x, y } = itemScales[index] || { scale: 1, x: 0, y: 0 };
const Tag = item.href ? 'a' : 'button';
return (
{ itemRefs.current[index] = el; }}
href={item.href}
className={`
relative flex items-center justify-center flex-shrink-0
bg-transparent border-none rounded-xl cursor-pointer
transition-colors duration-200
will-change-transform hover:bg-white/10
${item.disabled ? 'opacity-40 cursor-not-allowed' : ''}
${variant === 'neon' && item.active ? 'shadow-[0_0_15px_rgba(0,255,255,0.5)]' : ''}
`}
onClick={item.onClick}
disabled={item.disabled}
style={{
width: `${iconSize}px`,
height: `${iconSize}px`,
transform: `translate(${x}px, ${y}px) scale(${scale})`,
transition: `transform ${animationDuration}ms cubic-bezier(0.34, 1.56, 0.64, 1)`,
}}
aria-label={item.label}
>
{item.icon}
{item.badge && (
{item.badge}
)}
{item.active && (
)}
{item.label}
);
})}