import "virtual:svg-icons/register"; import { StaticAssetPath } from "../gen/static-icon-assets.gen"; type OnlySvgIcon = T extends `${infer Rest}.svg` ? Rest : never; type StripSvg = T extends `${infer Rest}.svg` ? Rest : T; type ReplaceSlash = T extends `${infer Left}/${infer Right}` ? `${Left}-${ReplaceSlash}` : T; type IconName = ReplaceSlash>>; export type IconType = IconName; export default function SvgIcon ({ icon, prefix = "icon", className, ...props }: { icon: IconType; prefix?: string; className?: string; }) { const symbolId = `#${prefix}-${icon}`; return ( ); }