'use client'
import { forwardRef, memo } from 'react'
import { isEmpty } from '~/src/utils/type'
import { BaseTagBadge, BaseTagBadgeText } from '~/src/components/BaseTagBadge'
import { Icon } from '~/src/components/Icon'
import { type BadgeProps } from './Badge.types'
const BADGE_TEST_ID = 'bezier-badge'
/**
* `Badge` is a component for representing badge, which consists of text and icon.
* @example
* ```tsx
*
* Beta
*
* ```
*/
export const Badge = memo(
forwardRef(function Badge(
{ size = 'm', variant = 'default', truncated, icon, children, ...rest },
forwardedRef
) {
return (
{icon && (
)}
{!isEmpty(children) && (
{children}
)}
)
})
)