--- // biome-ignore-all lint/correctness/noUnusedImports: Astro template consumes component imports. // biome-ignore-all lint/correctness/noUnusedVariables: Astro template consumes frontmatter values. import { TOOLS, toolSection } from "@snapotter/shared"; import * as lucideIcons from "lucide"; import { t } from "@/i18n"; import { localizeHref } from "@/lib/i18n-page"; import { loadToolStrings } from "@/lib/tool-strings"; interface Props { locale?: string; } const { locale = "en" } = Astro.props; // Tool name/description come from shared i18n (translated in all 21 langs). const toolStrings = await loadToolStrings(locale); const MODALITY_META: Record = { image: { label: "Image", color: "#E07832" }, video: { label: "Video", color: "#BE4A3C" }, audio: { label: "Audio", color: "#2C7A75" }, document: { label: "PDF", color: "#44568C" }, file: { label: "Files", color: "#5C8642" }, }; function renderIcon(iconName: string): string { const iconData = (lucideIcons as Record)[iconName]; if (!iconData || !Array.isArray(iconData)) return ""; return iconData .map(([tag, attrs]: [string, Record]) => { const attrStr = Object.entries(attrs) .map(([k, v]) => `${k}="${v}"`) .join(" "); return `<${tag} ${attrStr}/>`; }) .join(""); } ---