import { BadgeCheck, ShieldAlert, ShieldQuestion, Terminal, } from "lucide-react"; import type { FC } from "react"; import type { StoreTier } from "@/api/store"; import { Badge } from "@/components/ui/badge"; import { cn } from "@/lib/utils"; import { m } from "@/paraglide/messages"; // The trust model, rendered. These badges are the only place the console makes a claim about where // a plugin's code came from, so they are deliberately literal: ONLY the built-in `unom` source earns // the check mark, everything else says out loud that nobody at unom looked at the code. An entry // from an operator-added source additionally carries a naming that source — attribution // instead of a verification it hasn't got. /** The short, permanent provenance badge for a tier. */ export const TierBadge: FC<{ tier: StoreTier; className?: string }> = ({ tier, className, }) => { switch (tier) { case "verified": return ( {m.store_tier_verified()} ); case "external": return ( {m.store_tier_external()} ); case "unverified": return ( {m.store_tier_unverified()} ); default: return ( {m.store_tier_cli()} ); } }; /** "from " — who curated this entry. Shown for anything not from the built-in source. */ export const SourceChip: FC<{ source: string; className?: string }> = ({ source, className, }) => ( {m.store_from_source()} {source} );