import { Slot } from '@radix-ui/react-slot'
import { ChevronRight, MoreHorizontal } from 'lucide-react'
import * as React from 'react'
import { cn } from '@/lib/utils'
const Breadcrumb = React.forwardRef<
React.ComponentPropsWithoutRef<'nav'> & {
separator?: React.ReactNode
>(({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props} />)
Breadcrumb.displayName = 'Breadcrumb'
const BreadcrumbList = React.forwardRef<
React.ComponentPropsWithoutRef<'ol'>
>(({ className, ...props }, ref) => (
'flex flex-wrap items-center gap-1.5 font-base break-words text-sm text-text dark:text-darkText sm:gap-2.5',
BreadcrumbList.displayName = 'BreadcrumbList'
const BreadcrumbItem = React.forwardRef<
React.ComponentPropsWithoutRef<'li'>
>(({ className, ...props }, ref) => (
className={cn('inline-flex items-center gap-1.5', className)}
BreadcrumbItem.displayName = 'BreadcrumbItem'
const BreadcrumbLink = React.forwardRef<
React.ComponentPropsWithoutRef<'a'> & {
>(({ asChild, className, ...props }, ref) => {
const Comp = asChild ? Slot : 'a'
return <Comp ref={ref} className={cn(className)} {...props} />
BreadcrumbLink.displayName = 'BreadcrumbLink'
const BreadcrumbPage = React.forwardRef<
React.ComponentPropsWithoutRef<'span'>
>(({ className, ...props }, ref) => (
className={cn(className)}
BreadcrumbPage.displayName = 'BreadcrumbPage'
const BreadcrumbSeparator = ({
}: React.ComponentProps<'li'>) => (
className={cn('[&>svg]:size-3.5', className)}
{children ?? <ChevronRight />}
BreadcrumbSeparator.displayName = 'BreadcrumbSeparator'
const BreadcrumbEllipsis = ({
}: React.ComponentProps<'span'>) => (
className={cn('flex h-9 w-9 items-center justify-center', className)}
<MoreHorizontal className="h-4 w-4" />
<span className="sr-only">More</span>
BreadcrumbEllipsis.displayName = 'BreadcrumbElipssis'