'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import Link from 'next/link';
import { SidebarMenuItem, SidebarMenuButton } from '../../ui/sidebar.js';
import { useSoundAction } from '../../../hooks/use-sound-action.js';
export function SidebarNavItem({ icon: Icon, label, href, active = false, badge, }) {
    const navigateSound = useSoundAction('navigate');
    return (_jsx(SidebarMenuItem, { "data-testid": "sidebar-nav-item", children: _jsx(SidebarMenuButton, { asChild: true, isActive: active, tooltip: label, children: _jsxs(Link, { href: href, onClick: () => navigateSound.play(), children: [_jsx(Icon, {}), _jsx("span", { children: label }), badge != null && badge > 0 ? (_jsx("span", { className: "bg-destructive text-destructive-foreground ml-auto flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[10px] leading-none font-semibold", children: badge > 99 ? '99+' : badge })) : null] }) }) }));
}
