import { type CommonProps, type Refable, type Styleable } from "@trackunit/react-components"; import { type HTMLAttributes } from "react"; import type { MapTheme } from "../core/types"; import type { MarkerState } from "../markers/model/markerDomTypes"; import { type MarkerColorConfig } from "../markers/shared/markerColors"; import { type ClusterStickProps } from "./ClusterStick"; /** Pre-computed doughnut segment input. `weight` maps directly to `value` in `BaseDataEntry`. */ export type ClusterSegment = { readonly color: string; readonly weight: number; }; /** Distributive `Omit` so the `label`/`aria-label` discriminated union of `ClusterStickProps` is preserved. */ type DistributiveOmit = TUnion extends unknown ? Omit : never; /** * Per-member stick input. `onStickClick` is owned by `ClusterMarker` and forwarded with the stick's `id`. * `positioning` is computed by `ClusterMarker` from the fan angle — callers do not provide it. * `open` is managed internally — callers do not provide it. */ export type ClusterMarkerStickInput = DistributiveOmit; type ClusterMarkerDivHandlers = Pick, "onClick" | "onKeyDown" | "onMouseEnter" | "onMouseLeave" | "onFocus" | "onBlur">; type ClusterMarkerBaseProps = CommonProps & Styleable & Refable & ClusterMarkerDivHandlers & { /** Total member count. Rendered via {@link formatClusterCount}. */ count: number; /** Doughnut ring segments. Empty array suppresses the ring. */ segments: ReadonlyArray; /** * Optional cluster member sticks fanned out around the bubble at evenly spread angles. * Intended for clusters with 6 or fewer members; above that, stick labels become crowded. */ sticks?: ReadonlyArray; /** Fired by each fanned-out stick with its `id`. */ onStickClick?: (id: string) => void; state?: MarkerState; theme: MapTheme; colorConfig?: MarkerColorConfig; }; export type ClusterMarkerProps = ClusterMarkerBaseProps & { "aria-label"?: string; }; export declare const ClusterMarker: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; export {};