import type { ReactNode } from 'react' import { Tabs, TabsContent, TabsList, TabsTrigger } from '@evobgp/ui/components/tabs' import { cn } from '@evobgp/ui/lib/utils' export type SegmentedTabItem = { value: string label: string count?: number /** @deprecated Счётчик теперь без плашки (линейные вкладки макета). */ badgeVariant?: string icon?: ReactNode } interface SegmentedTabsProps { items: SegmentedTabItem[] value?: string defaultValue?: string onValueChange?: (value: string) => void children: ReactNode className?: string listClassName?: string contentClassName?: string } /** * Page-level section switcher — line tabs as on the shared mockup boards. * @see https://reui.io/preview/base/components/c-tabs-9 * @see https://reui.io/components/tabs */ export function SegmentedTabs({ items, value, defaultValue, onValueChange, children, className, listClassName, contentClassName, }: SegmentedTabsProps) { return ( {items.map((item) => ( {item.icon} {item.label} {item.count !== undefined ? ( {item.count} ) : null} ))}
{children}
) } export { TabsContent }