import React from 'react'; import { LuLock } from 'react-icons/lu'; import InfoTooltip from '../agent-analytics/InfoTooltip'; import { cn } from './cn'; /** A gradient-filled badge shape ("Hybrid v2": flower / 4 leaves / gem on top). */ type BadgeShape = (props: { className?: string }) => React.ReactElement; const SparkBadge: BadgeShape = ({ className }) => ( ); const TriangleBadge: BadgeShape = ({ className }) => ( ); const DiamondBadge: BadgeShape = ({ className }) => ( ); const PentagonBadge: BadgeShape = ({ className }) => ( ); const HexagonBadge: BadgeShape = ({ className }) => ( ); /** Badge tiers, unlocked by the number of quests resolved. */ const BADGE_TIERS: ReadonlyArray<{ threshold: number; name: string; tagline: string; Shape: BadgeShape; }> = [ { threshold: 1, name: 'First Spark', tagline: 'Your AI journey begins', Shape: SparkBadge, }, { threshold: 5, name: 'On Fire', tagline: 'Building real momentum', Shape: TriangleBadge, }, { threshold: 10, name: 'Trailblazer', tagline: 'Ahead of the pack', Shape: DiamondBadge, }, { threshold: 25, name: 'Visionary', tagline: 'Seen everywhere AI looks', Shape: PentagonBadge, }, { threshold: 50, name: 'AI Icon', tagline: 'Top of the AI game', Shape: HexagonBadge, }, ]; /** * The merchant's badge shelf: shape badges that unlock as quests are resolved. * Earned badges are bright; locked ones are dimmed. * * @param props - Component props. * @param props.resolvedCount - Number of quests resolved all-time. * @return The badge row. */ export function CopilotBadges({ resolvedCount, }: { resolvedCount: number; }): React.ReactElement { return (

Badges

{BADGE_TIERS.map(tier => { const earned: boolean = resolvedCount >= tier.threshold; return (
1 ? 's' : ''})`} className="flex flex-1 flex-col items-center gap-1" >
{!earned && ( )}
{earned ? tier.name : tier.threshold}
); })}
); }