import React from "react";
import type { MjolnirGestureEvent } from "mjolnir.js";
import type { Color, LayerProps, LayersList, PickingInfo, View } from "@deck.gl/core";
import type { DeckGLProps, DeckGLRef } from "@deck.gl/react";
import { OrbitView, OrthographicView } from "@deck.gl/core";
import type { colorTablesArray } from "@emerson-eps/color-tables/";
import type { BoundingBox2D, BoundingBox3D, Point2D, Point3D } from "../utils";
import type { InfoCardProps } from "./InfoCard";
import type { Unit } from "convert-units";
import type { LightsType, TLayerDefinition } from "../SubsurfaceViewer";
import type { ViewportType } from "../views/viewport";
import { SectionView } from "../views/sectionView";
/**
 * Type of the function returning coordinate boundary for the view defined as [left, bottom, right, top].
 */
export type BoundsAccessor = () => BoundingBox2D;
export type PickingInfoExt = PickingInfo & {
    scaledCoordinate?: Point2D | Point3D | undefined;
};
export type TooltipCallback = (info: PickingInfo) => string | Record<string, unknown> | null;
/**
 * Views
 */
export interface ViewsType {
    /**
     * Layout for viewport in specified as [row, column].
     */
    layout: [number, number];
    /**
     * Number of pixels used for the margin in matrix mode.
     * Defaults to 0.
     */
    marginPixels?: number;
    /**
     * Show views label.
     */
    showLabel?: boolean;
    /**
     * Layers configuration for multiple viewports.
     */
    viewports: ViewportType[];
}
/**
 * Camera view state.
 */
export interface ViewStateType {
    target: Point2D | Point3D | undefined;
    zoom: number | Point2D | BoundingBox3D | undefined;
    rotationX: number;
    rotationOrbit: number;
    minZoom?: number;
    maxZoom?: number;
    transitionDuration?: number;
}
export interface MapMouseEvent {
    type: "click" | "hover" | "contextmenu";
    infos: PickingInfo[];
    x?: number;
    y?: number;
    wellname?: string;
    wellcolor?: Color;
    md?: number;
    tvd?: number;
}
export type EventCallback = (event: MapMouseEvent) => void;
export declare function useHoverInfo(): [PickingInfo[], EventCallback];
export interface MapProps {
    /**
     * The ID of this component, used to identify dash components
     * in callbacks. The ID needs to be unique across all of the
     * components in an app.
     */
    id: string;
    /**
     * Resource dictionary made available in the DeckGL specification as an enum.
     * The values can be accessed like this: `"@@#resources.resourceId"`, where
     * `resourceId` is the key in the `resources` dict. For more information,
     * see the DeckGL documentation on enums in the json spec:
     * https://deck.gl/docs/api-reference/json/conversion-reference#enumerations-and-using-the--prefix
     */
    resources?: Record<string, unknown>;
    layers?: LayersList;
    /**
     * Coordinate boundary for the view defined as [left, bottom, right, top].
     * Should be used for 2D view only.
     */
    bounds?: BoundingBox2D | BoundsAccessor;
    /**
     * Camera state for the view defined as a ViewStateType.
     * Should be used for 3D view only.
     * If the zoom is given as a 3D bounding box, the camera state is computed to
     * display the full box.
     */
    cameraPosition?: ViewStateType;
    /**
     * If changed will reset view settings (bounds or camera) to default position.
     */
    triggerHome?: number;
    /**
     * Views configuration for map. If not specified, all the layers will be
     * displayed in a single 2D viewport
     */
    views?: ViewsType;
    /**
     * Parameters for the InfoCard component
     * @deprecated - Use pickingDepth, multiPicking, and showReadout instead
     */
    coords?: {
        visible?: boolean | null;
        multiPicking?: boolean | null;
        pickDepth?: number | null;
    } | null;
    /**
     * The amount of items that gets picked. Should be a positive integer. With depth 0, no picking info will be returned. Can alternatively provide a function to give a dynamic value.
     */
    pickingDepth?: number | ((type: "click" | "hover") => number);
    /**
     * Extra pixels around the pointer to include while picking.
     */
    pickingRadius?: number;
    /**
     * If true, the built-in readout box will be shown
     */
    showReadout?: boolean | ((props: InfoCardProps) => React.ReactNode);
    /**
     * Parameters for the Distance Scale component
     */
    scale?: {
        visible?: boolean | null;
        incrementValue?: number | null;
        widthPerUnit?: number | null;
        cssStyle?: Record<string, unknown> | null;
    };
    coordinateUnit?: Unit;
    /**
     * @deprecated Not in use
     */
    toolbar?: {
        visible?: boolean | null;
    };
    /**
     * Prop containing color table data
     */
    colorTables?: colorTablesArray;
    /**
     * @deprecated Used by layers to propagate state to component, eg. selected
     * wells from the Wells layer. Use client code to handle layer state
     * instead.
     */
    editedData?: Record<string, unknown>;
    /**
     * @deprecated Used by layers to propagate state to component, eg. selected
     * wells from the Wells layer. Use client code to handle layer state
     * instead.
     */
    setEditedData?: (data: Record<string, unknown>) => void;
    /**
     * Validate JSON datafile against schema
     */
    checkDatafileSchema?: boolean;
    /**
     * For get mouse events
     */
    onMouseEvent?: EventCallback;
    getCameraPosition?: (input: ViewStateType) => void;
    /**
     * Will be called while layers have rendered data.
     * @param progress value between 0 and 100.
     */
    onRenderingProgress?: (progress: number) => void;
    onDragStart?: (info: PickingInfo, event: MjolnirGestureEvent) => void;
    onDragEnd?: (info: PickingInfo, event: MjolnirGestureEvent) => void;
    onDrag?: (info: PickingInfo, event: MjolnirGestureEvent) => void;
    /**
     * Override default cursor with a callback.
     * @param cursorState
     * @returns cursor string
     * @default "grabbing" when dragging, "default" otherwise
     * @see https://developer.mozilla.org/en-US/docs/Web/CSS/cursor
     */
    getCursor?: DeckGLProps["getCursor"];
    triggerResetMultipleWells?: number;
    /**
     * Range selection of the current well
     */
    selection?: {
        well: string | undefined;
        selection: [number | undefined, number | undefined] | undefined;
    };
    lights?: LightsType;
    children?: React.ReactNode;
    /**
     * Override default tooltip with a callback.
     */
    getTooltip?: TooltipCallback;
    /** A vertical scale factor, used to scale items in the view vertically */
    verticalScale?: number;
    /**
     * A reference to a wrapped div element, which can be used to attach
     * an event listener.
     */
    innerRef?: React.Ref<HTMLElement>;
    /**
     * The reference to the deck.gl instance.
     */
    deckGlRef?: React.ForwardedRef<DeckGLRef>;
}
export type ViewTypeType = typeof OrbitView | typeof OrthographicView | typeof SectionView;
declare const Map: React.FC<MapProps>;
export default Map;
export declare function jsonToObject(data: Record<string, unknown>[] | LayerProps[], enums?: Record<string, unknown>[] | undefined): LayersList | View[];
/**
 * Creates layers according to layer definiton Records.
 * Keeps the relative order of layers.
 * @param layers Array of layer definition Records or externally created layers.
 * @returns Array of layer instances.
 */
export declare function createLayers(layers: TLayerDefinition[], enums?: Record<string, unknown>[] | undefined): LayersList;
