import { NavLink } from "react-router-dom";
import { cn } from "@/lib/utils";
import { NAV_ITEMS } from "./nav";
export function Sidebar() {
return (
<aside className="hidden md:flex w-56 flex-col border-r bg-card/40 px-3 py-4">
<div className="px-2 pb-4 text-sm font-semibold tracking-wide">
<span className="text-primary">rust</span>akka
</div>
<nav className="flex flex-col gap-0.5">
{NAV_ITEMS.map((item) => (
<NavLink
key={item.to}
to={item.to}
end={item.to === "/"}
className={({ isActive }) =>
cn(
"flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-muted-foreground transition-colors",
"hover:bg-muted hover:text-foreground",
isActive && "bg-muted text-foreground",
)
}
>
<item.icon className="size-4" aria-hidden />
<span>{item.label}</span>
</NavLink>
))}
</nav>
</aside>
);
}