'use client'; import * as React from 'react'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { Ellipsis } from 'lucide-react'; import { cn } from '@/lib/utils'; import { Sheet, SheetContent, SheetHeader, SheetTitle } from '@/components/ui/sheet'; import { NavList } from '@/components/layout/nav-list'; import type { NavItem } from '@/lib/layout/nav-items'; function isActive(pathname: string, href: string): boolean { return pathname === href || pathname.startsWith(`${href}/`); } interface BottomTabBarProps { /** Os 4 itens principais, já resolvidos na ordem de exibição. */ items: NavItem[]; /** Restante do menu, exibido no sheet "Mais". */ moreItems: NavItem[]; } /** Bottom tab bar mobile (` isActive(pathname, item.href) || item.children?.some((child) => isActive(pathname, child.href)), ); return ( <> Mais opções
setMoreOpen(false)} />
); }