"use client"; import type { FirmwareInfo } from "@/lib/firmware"; import { cn } from "@/lib/utils"; /** Renders HTML on-device UI mock (preferred) — never uses raster covers. */ export function FirmwarePreview({ fw, className, title, }: { fw: FirmwareInfo; className?: string; title?: string; }) { if (fw.media.preview) { return ( ); } const initials = fw.name .replace(/[^A-Za-z0-9\u4e00-\u9fff]+/g, " ") .trim() .split(/\s+/) .slice(0, 2) .map((w) => w[0]?.toUpperCase() ?? "") .join(""); return (