import { safelySpreadBoxProps } from '@twilio-paste/box' ; import type { BadgeProps } from './types' ; export const isFocusableElement = ( { as } ) : boolean => as === 'button' || as === 'a' ; export const getBadgeSpanProps = ( props ) : Partial < BadgeProps > => { if ( isFocusableElement ( props ) ) { return { } ; } return safelySpreadBoxProps ( props ) ; } ;