import type { EnvironmentMachineKind } from "@t3tools/contracts"; import { msg } from "gt-react"; import { CloudIcon, LaptopIcon, MonitorIcon, ServerIcon, type LucideProps } from "lucide-react"; import type { FunctionComponent, SVGProps } from "react"; import { LinuxIcon } from "./Icons"; function LucideLike(props: SVGProps) { return ( ); } function MacMiniIcon(props: SVGProps) { return ( ); } function MacStudioIcon(props: SVGProps) { return ( ); } const ICON_BY_KIND: Record> = { server: ServerIcon, cloud: CloudIcon, linux: LinuxIcon, desktop: MonitorIcon, laptop: LaptopIcon, "mac-mini": MacMiniIcon, "mac-studio": MacStudioIcon, }; export const ENVIRONMENT_MACHINE_KIND_LABELS: Record = { server: msg("Server"), cloud: msg("Cloud VM"), linux: msg("Linux/WSL"), desktop: msg("Desktop", { $context: "machine type" }), laptop: msg("Laptop"), "mac-mini": msg("Mini PC"), "mac-studio": msg("Workstation"), }; export function environmentMachineIcon( kind: EnvironmentMachineKind, ): FunctionComponent { return ICON_BY_KIND[kind]; } export function EnvironmentMachineIcon({ kind, ...props }: LucideProps & { readonly kind: EnvironmentMachineKind }) { const Icon = ICON_BY_KIND[kind]; return ; }