import * as react_jsx_runtime from 'react/jsx-runtime';
import { ReactNode } from 'react';

/** Map transform state */
interface MapTransform {
    x: number;
    y: number;
    scale: number;
}
/**
 * Convert geographic coordinates to SVG viewBox coordinates for the built-in world map.
 *
 * @param lat  Latitude  (-90 to 90,  positive = North)
 * @param lng  Longitude (-180 to 180, positive = East)
 * @returns    [x, y] in SVG viewBox space (0–1010 × 0–666)
 */
declare function latlngToSvg(lat: number, lng: number): [number, number];
/**
 * Convert SVG viewBox coordinates back to geographic lat/lng.
 * Inverse of `latlngToSvg`.
 */
declare function svgToLatlng(svgX: number, svgY: number): [number, number];
/** Build a quadratic bezier arc path string between two SVG points. */
declare function arcPath(x1: number, y1: number, x2: number, y2: number, curvature?: number): string;
/**
 * Convert waypoint SVG coords to viewport-relative pixel position.
 * Returns `fixed`-positioning values (relative to the viewport).
 */
declare function svgCoordsToViewportPx(svgX: number, svgY: number, transform: MapTransform, containerEl: HTMLDivElement, viewBox: string): {
    left: number;
    top: number;
};

interface Region {
    countries: string[];
    name: string;
    color?: string;
    href?: string;
}
interface MapView {
    x: number;
    y: number;
    scale: number;
}
/** SVG-level style overrides — values that cannot be expressed as Tailwind classes */
interface MapStyles {
    /** Background fill of the map container. Default: '#f0f8ff' */
    mapBackground?: string;
    /** Fill for countries not assigned to any region. Default: '#e5e7eb' */
    countryDefaultFill?: string;
    /** Fill for dimmed countries when another region is hovered. Default: region color + '66' alpha or '#d1d5db' */
    countryDimmedFill?: string;
    /** Stroke drawn between countries. Default: '#ffffff' */
    countryStroke?: string;
    /** Fallback region color when none is set on the region. Default: '#3b82f6' */
    regionDefaultColor?: string;
}
/** Tailwind class overrides per named UI slot */
interface MapClassNames {
    section?: string;
    header?: string;
    title?: string;
    content?: string;
    mapContainer?: string;
    resetButton?: string;
    zoomButton?: string;
    legend?: string;
    legendItem?: string;
    legendItemActive?: string;
    tooltip?: string;
}
interface InteractiveRegionsMapProps {
    title: string;
    content?: string;
    regions: Region[];
    initialView?: MapView;
    mapStyles?: MapStyles;
    classNames?: MapClassNames;
    onRegionClick?: (region: Region) => void;
    onRegionHover?: (region: Region | null) => void;
    className?: string;
    children?: ReactNode;
}
type TransportMode = 'flight' | 'drive' | 'train' | 'ferry' | 'walk' | 'custom';
interface Waypoint {
    /** Unique identifier */
    id: string;
    /** Display name shown in callouts and step lists */
    label: string;
    /** X coordinate in SVG viewBox space (0–1010) */
    x: number;
    /** Y coordinate in SVG viewBox space (0–666) */
    y: number;
    /** Mode of transport used to ARRIVE at this waypoint. Default: 'flight' */
    transport?: TransportMode;
    /** Override the transport icon with any ReactNode (used when transport='custom') */
    transportIcon?: ReactNode;
    /** Optional description shown in callout */
    description?: string;
    /** Travel duration to this waypoint, e.g. "2h 30m" */
    duration?: string;
    /** Any extra key/value metadata */
    meta?: Record<string, string>;
}
interface JourneyProps {
    waypoints: Waypoint[];
    /** Controlled active step index */
    activeIndex?: number;
    /** Uncontrolled starting index. Default: 0 */
    defaultActiveIndex?: number;
    /** Called when the active step changes */
    onStepChange?: (index: number, waypoint: Waypoint) => void;
    /** Show all route lines always, or only up to the current step. Default: true */
    showFullRoute?: boolean;
    /** Automatically pan+zoom the map to centre on the active waypoint. Default: true */
    autoFocus?: boolean;
    /** Zoom level applied when auto-focusing a waypoint. Default: 3 */
    autoFocusScale?: number;
    /** Duration of the transport icon animation in ms. Default: 800 */
    animationDuration?: number;
    /** Route line + waypoint dot color. Default: '#0ea5e9' */
    pathColor?: string;
    /** Active waypoint dot color. Default: '#0ea5e9' */
    activeWaypointColor?: string;
    /** Inactive waypoint dot color. Default: '#64748b' */
    waypointColor?: string;
    /** Extra class on the SVG overlay <g> */
    className?: string;
    /** Primitives to render outside the SVG overlay (callout, controls, step list) */
    children?: ReactNode;
}
interface JourneyContextValue {
    waypoints: Waypoint[];
    activeIndex: number;
    previousIndex: number | null;
    isAnimating: boolean;
    animationDuration: number;
    pathColor: string;
    waypointColor: string;
    activeWaypointColor: string;
    showFullRoute: boolean;
    goTo: (index: number) => void;
    goNext: () => void;
    goPrev: () => void;
    /** Children to be rendered outside the map canvas (controls, step list, callout) */
    extraChildren: ReactNode;
}
declare function useJourneyContext(): JourneyContextValue;
declare function MapLegend({ className }: {
    className?: string;
}): react_jsx_runtime.JSX.Element | null;
declare namespace MapLegend {
    var displayName: string;
}
declare function MapTooltip({ className }: {
    className?: string;
}): react_jsx_runtime.JSX.Element | null;
declare namespace MapTooltip {
    var displayName: string;
}
declare function MapResetButton({ className, children, }: {
    className?: string;
    children?: ReactNode;
}): react_jsx_runtime.JSX.Element;
declare namespace MapResetButton {
    var displayName: string;
}
type ZoomControlsPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
declare function MapZoomControls({ className, position, }: {
    className?: string;
    position?: ZoomControlsPosition;
}): react_jsx_runtime.JSX.Element;
declare namespace MapZoomControls {
    var displayName: string;
}
/**
 * Floating label callout anchored to the active waypoint.
 *
 * Rendered as a SVG <foreignObject> inside the journey overlay so it follows
 * the map transform perfectly — no JS positioning calculation needed, no drift.
 *
 * Must be placed as a child of <MapJourney>.
 */
declare function JourneyCallout({ className }: {
    className?: string;
}): react_jsx_runtime.JSX.Element | null;
declare namespace JourneyCallout {
    var displayName: string;
}
/**
 * Previous / Next step buttons + step counter.
 * Must be placed inside <InteractiveRegionsMap.Journey> to access JourneyContext.
 * Has no dependency on MapContext.
 */
declare function JourneyControls({ className, prevLabel, nextLabel, showCounter, }: {
    className?: string;
    prevLabel?: ReactNode;
    nextLabel?: ReactNode;
    showCounter?: boolean;
}): react_jsx_runtime.JSX.Element;
declare namespace JourneyControls {
    var displayName: string;
}
/**
 * Ordered list of all waypoints — useful as a sidebar itinerary.
 * Highlights the active step.
 * Accepts a renderItem render-prop for full customisation.
 */
declare function JourneyStepList({ className, renderItem, }: {
    className?: string;
    renderItem?: (waypoint: Waypoint, index: number, isActive: boolean, goTo: (i: number) => void) => ReactNode;
}): react_jsx_runtime.JSX.Element;
declare namespace JourneyStepList {
    var displayName: string;
}
/**
 * Renders the journey route as an SVG overlay on the map canvas.
 * Also acts as the JourneyContext provider for all journey primitives.
 *
 * Must be placed as a child of <InteractiveRegionsMap>.
 * Place <InteractiveRegionsMap.JourneyCallout /> etc. as children of this component.
 */
declare function MapJourney({ waypoints, activeIndex: controlledIndex, defaultActiveIndex, onStepChange, showFullRoute, autoFocus, autoFocusScale, animationDuration, pathColor, waypointColor, activeWaypointColor, className, children, }: JourneyProps): react_jsx_runtime.JSX.Element;
declare namespace MapJourney {
    var displayName: string;
}
declare function InteractiveRegionsMapRoot({ title, content, regions, initialView, mapStyles, classNames, onRegionClick, onRegionHover, className, children, }: InteractiveRegionsMapProps): react_jsx_runtime.JSX.Element;
declare const InteractiveRegionsMap: typeof InteractiveRegionsMapRoot & {
    Legend: typeof MapLegend;
    Tooltip: typeof MapTooltip;
    ResetButton: typeof MapResetButton;
    ZoomControls: typeof MapZoomControls;
    Journey: typeof MapJourney;
    JourneyCallout: typeof JourneyCallout;
    JourneyControls: typeof JourneyControls;
    JourneyStepList: typeof JourneyStepList;
};

/**
 * City database for the @foundrykit/maps world map.
 *
 * Each entry: { id, name, country (ISO 3166-1 alpha-2), lat, lng, type }
 *
 * SVG coordinates can be obtained via `latlngToSvg(lat, lng)` from geo.ts.
 * Coordinates for the WAYPOINTS shorthand helper are pre-computed.
 *
 * type:
 *   'capital'  — national capital
 *   'major'    — major city / regional hub
 */
interface City {
    id: string;
    name: string;
    country: string;
    lat: number;
    lng: number;
    type: 'capital' | 'major';
}
declare const CITIES: City[];
/**
 * Get SVG coordinates for a city by its id.
 * Returns null if city not found.
 */
declare function getCityById(id: string): City | undefined;
/**
 * Get all capitals.
 */
declare function getCapitals(): City[];
/**
 * Get cities for a specific country (ISO 3166-1 alpha-2).
 */
declare function getCitiesForCountry(countryCode: string): City[];

export { CITIES, type City, InteractiveRegionsMap, type InteractiveRegionsMapProps, JourneyCallout, JourneyControls, type JourneyProps, JourneyStepList, type MapClassNames, MapJourney, MapLegend, MapResetButton, type MapStyles, MapTooltip, type MapTransform, type MapView, MapZoomControls, type Region, type TransportMode, type Waypoint, type ZoomControlsPosition, arcPath, getCapitals, getCitiesForCountry, getCityById, latlngToSvg, svgCoordsToViewportPx, svgToLatlng, useJourneyContext };
