import { NavLink, useLocation } from 'react-router-dom'
import { navGroupsForOnboarding, onboardingGlowClass, shouldGlowNav } from '../lib/onboarding'
import type { AcAppKey } from '../lib/acAssets'
import { useOnboarding } from '../onboarding/OnboardingContext'
import { AcIcon } from './AcIcon'
function SidebarNavItem({
to,
label,
icon,
end,
matchPrefix,
guideGlow,
}: {
to: string
label: string
icon: AcAppKey
end?: boolean
matchPrefix?: string
guideGlow?: boolean
}) {
const { pathname } = useLocation()
return (
{
const prefixActive = matchPrefix ? pathname.startsWith(matchPrefix) : false
const active = isActive || prefixActive
return `ac-sidebar-nav-item relative ${active ? 'ac-sidebar-nav-item--active' : ''} ${onboardingGlowClass(!!guideGlow)}`
}}
>
{guideGlow ? (
下一步
) : null}
{label}
)
}
export function AppSidebar() {
const { pathname } = useLocation()
const { isComplete, nextStep } = useOnboarding()
const groups = navGroupsForOnboarding(isComplete)
return (
)
}