"use client"; import type { ReactNode, SVGProps } from "react"; import { useId } from "react"; /** * Inline UI icons (pixel-identical to the SVGs previously served from * `public/assets/images/*.svg` via `next/image`). * * Rendering icons as inline SVG removes the per-icon network request, the * `next/image` lazy-loading behaviour and the `public/` cache revalidation * from the critical path — icons are present in the first rendered markup. * Gradient/clip-path ids are scope-prefixed with `useId` so multiple * instances on one page never collide. */ export type UiIconName = | "support" | "info" | "document" | "terms" | "rules" | "question" | "person" | "education" | "details" | "checklist" | "contact" | "health" | "family" | "marriage" | "lifestyle" | "criteria" | "verification" | "personality" | "glasser" | "success" | "diamond" | "play"; type UiIconProps = SVGProps & { name: UiIconName; }; const PINK_GRADIENT_STOPS: ReactNode = ( <> ); export function UiIcon({ name, ...props }: UiIconProps) { const uid = useId().replace(/[^a-zA-Z0-9_-]/g, ""); const gradientId = `ui-icon-grad-${uid}`; const clipId = `ui-icon-clip-${uid}`; switch (name) { case "support": return ( ); case "info": return ( ); case "document": case "terms": case "rules": return ( ); case "question": return ( ); case "person": return ( ); case "education": return ( ); case "details": return ( ); case "checklist": return ( ); case "contact": return ( ); case "health": return ( ); case "family": return ( ); case "marriage": return ( ); case "lifestyle": return ( ); case "criteria": return ( ); case "verification": return ( ); case "personality": return ( ); case "glasser": return ( ); case "success": return ( ); case "diamond": return ( ); case "play": return ( ); default: return null; } } export default UiIcon;