{"version":3,"file":"MapTooltip.cjs","names":[],"sources":["../../src/br/MapTooltip.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport styles from \"./BrazilMap.module.css\";\n\nexport interface MapTooltipProps {\n    /** X position in pixels, relative to the map container. */\n    x: number;\n    /** Y position in pixels, relative to the map container. */\n    y: number;\n    /** Tooltip body. */\n    children: ReactNode;\n    className?: string;\n}\n\n/**\n * Floating tooltip anchored near the cursor over a map. Positioned absolutely\n * inside the map container (which is `position: relative`) and non-interactive\n * so it never steals hover from the shapes beneath it.\n */\nexport function MapTooltip({ x, y, children, className }: MapTooltipProps) {\n    return (\n        <div\n            className={cn(styles.tooltip, className)}\n            style={{ left: x, top: y }}\n            data-testid=\"map-tooltip\"\n            aria-hidden\n        >\n            {children}\n        </div>\n    );\n}\n"],"mappings":"0GAmBA,SAAgB,EAAW,CAAE,IAAG,IAAG,WAAU,aAA8B,CACvE,OACI,EAAA,EAAA,IAAA,CAAC,MAAD,CACI,UAAW,EAAA,GAAG,EAAA,QAAO,QAAS,CAAS,EACvC,MAAO,CAAE,KAAM,EAAG,IAAK,CAAE,EACzB,cAAY,cACZ,cAAA,GAEC,UACA,CAAA,CAEb"}