import React , { forwardRef , memo } from 'react' ; import Text from '../../primitives/Text' ; import type { IBreadcrumbItemContext , IBreadcrumbTextProps } from './types' ; import { BreadcrumbItemContext } from './Context' ; import { usePropsResolution } from '../../../hooks/useThemeProps/usePropsResolution' ; const BreadcrumbText = ( props , ref ? ) => { const { isCurrent } = React . useContext ( BreadcrumbItemContext ) ; let { children , _current , ... resolvedProps } = usePropsResolution ( 'BreadcrumbText' , props ) ; return ( < Text ref = { ref } { ... ( isCurrent && _current ) } { ... resolvedProps } > { children } < /Text>); } ; export default memo ( forwardRef ( BreadcrumbText ) ) ;