import type { LucideIcon } from "lucide-react"; import { cn } from "@/lib/utils"; import { MAP_ICON_CELL_RADIUS_CLASS_NAME, MAP_MAJOR_PANEL_RADIUS_CLASS_NAME, MAP_READABLE_RADIUS_CLASS_NAME, MAP_READABLE_SURFACE_CLASS_NAME, MAP_TOOL_PANEL_SURFACE_CLASS_NAME } from "./map-control-styles"; export type MapLegendItem = { id: string; label: string; description?: string; color: string; icon?: LucideIcon; imageSrc?: string; shape?: "line" | "dashed-line" | "dash-dot-line" | "dot" | "ring" | "square"; }; type MapLegendProps = { title?: string; items: MapLegendItem[]; className?: string; }; export function MapLegend({ title = "图例", items, className = "" }: MapLegendProps) { return (

{title}

业务图层语义

); } type MapLegendListProps = { items: MapLegendItem[]; className?: string; showStatusDot?: boolean; }; export function MapLegendList({ items, className = "", showStatusDot = false }: MapLegendListProps) { return ( ); } export function MapLegendSwatch({ color, shape = "dot" }: Pick) { if (shape === "line") { return ; } if (shape === "dashed-line" || shape === "dash-dot-line") { return ( ); } if (shape === "square") { return ; } if (shape === "ring") { return ; } return ; }