import { useTranslations } from 'next-intl';

/**
 * The "new" mark of a main menu item: a small pill raised over the end of the label, like an
 * exponent. Its parent wraps the label only and must be `relative`.
 */
export default function NewMenuBadge() {
  const tCommon = useTranslations('common');
  return (
    <span className="pointer-events-none absolute bottom-full left-full -mb-2 -ml-0.5 z-20 whitespace-nowrap rounded-full bg-gradient-to-r from-purple-700 to-pink-700 px-2 py-0.5 text-[10px] font-bold leading-none tracking-normal text-white shadow-sm">
      {tCommon('new')}
    </span>
  );
}
