import React , { forwardRef , memo } from 'react' ; import { Platform } from 'react-native' ; import { HStack } from '../../primitives/Stack' ; import { BreadcrumbItemContext } from './Context' ; import type { IBreadcrumbItemProps } from './types' ; import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps' ; const BreadcrumbItem = ( props , ref ? ) => { const { children , isCurrent , _text , ... remainingProps } = props ; if ( useHasResponsiveProps ( props ) ) { return null ; } return ( < BreadcrumbItemContext . Provider value = { { isCurrent } } > < HStack { ... remainingProps } ref = { ref } > { React . Children . map ( children , ( child , index ) => React . cloneElement ( child , { 'key' : `breadcrumb-item-${ index }` , '_text' : { ... _text , fontWeight : 700 , } , ... { isUnderlined : false , } , ... remainingProps , 'aria-current' : Platform . OS === 'web' && isCurrent ? 'page' : undefined , } ) ) } < /HStack> < /BreadcrumbItemContext.Provider>); } ; export default memo ( forwardRef ( BreadcrumbItem ) ) ;