/** * Lit rendering for the shared icon registry (`registry.generated.ts`, * generated from tools/icons/curated-icons.json). The glyph path data is * bundled — no CDN and no runtime fetch. */ import { html, svg, type TemplateResult } from "lit"; import { resolveIcon } from "./registry.generated"; /** * A stored definition icon (`lucide:`, `fa:`, `emoji:` * or a legacy bare Lucide name) as a template; anything that resolves to the * registry fallback renders `fallback` instead. */ export function renderQuestIcon( value: string | null, fallback: TemplateResult ): TemplateResult { const icon = resolveIcon(value); switch (icon.kind) { case "lucide": return html``; case "fa": return html``; case "emoji": return html`${icon.text}`; case "fallback": return fallback; } }