import type { FC, ReactNode } from 'react' import classnames from 'classnames' import OLTooltip from '@/features/ui/components/ol/ol-tooltip' import MaterialIcon from '@/shared/components/material-icon' import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher' type TooltipProps = { id: string text: ReactNode className?: string placement?: NonNullable< React.ComponentProps['overlayProps'] >['placement'] } const BetaBadge: FC<{ tooltip: TooltipProps url?: string phase?: string }> = ({ tooltip, url = '/beta/participate', phase = 'beta' }) => { const badgeClass = chooseBadgeClass(phase) return ( {tooltip.text} } bs5={ } /> ) } export const chooseBadgeClass = (phase?: string) => { switch (phase) { case 'release': return 'info-badge' case 'alpha': return 'alpha-badge' case 'beta': default: return 'beta-badge' } } export default BetaBadge