import type Color from "@arcgis/core/Color";
import type { LayerExtension } from "@vertigis/arcgis-extensions/mapping/LayerExtension";
import type { SublayerExtension } from "@vertigis/arcgis-extensions/mapping/SublayerExtension";
/**
 * Well known connection points for Snapping.
 */
export interface SnappingConnections {
    /**
     * Enable connections to an edge, defaults to true.
     */
    edge?: boolean;
    /**
     * Enable connections to vertices, defaults to allow all connections.
     */
    vertices?: boolean;
}
/**
 * Configuration for snapping destinations.
 */
export interface SnappingDestinationProperties {
    /**
     * The destination layer or sublayer extension.
     */
    destination: LayerExtension | SublayerExtension;
    /**
     * Optional SQL92 formatted query for filtering features to be considered
     * for snapping.
     */
    sqlQuery?: string;
}
/**
 * Maps snapping source layers to destination layers to be considered.
 */
export interface SnappingSourceMapping {
    /**
     * Types of snapping connections to be considered for this source.
     */
    connections?: SnappingConnections;
    /**
     * The snapping destinations, if not provided all destinations will be
     * considered.
     */
    destinations?: SnappingDestinationProperties[];
    /**
     * Turns on validation of snapping. "initial-points" requires the first
     * point to snap (in draw mode) or pre-existing snapped points to snap (in
     * edit mode). Defaults to "off".
     */
    required?: "off" | "initial-points" | "all-points";
    /**
     * The color to use for snapping guides generated by this source.
     */
    guideColor?: Color;
    /**
     * The snapping source. If omitted the configuration will be applied to all
     * existing sources.
     */
    source?: LayerExtension | SublayerExtension;
}
/**
 * Global configuration for snapping.
 */
export interface SnappingProperties {
    /**
     * The radius in screen units in which the user will be automatically
     * snapped. Defaults to 25.
     */
    snappingRadius?: number;
    /**
     * Configuration for snapping sources.
     */
    sourceMappings?: SnappingSourceMapping[];
    /**
     * The radius in screen units in which to search for things to snap to
     * (these are displayed as guides). Should be larger than snappingRadius.
     * Defaults to 150.
     */
    maxSearchRadius?: number;
    /**
     * Indicates the maximum number of snapping guides to be displayed at any
     * time. Defaults to 4.
     */
    maxSnappingGuides?: number;
    /**
     * Indicates that snapping should respect the layer's visibility in the
     * layer list, i.e. if a layer is not checked here it will not be considered
     * for snapping. Defaults to true.
     */
    respectLayerVisibility?: boolean;
    /**
     * Enable the automatic application of feature class based rules if any
     * utility networks are included in the web map.
     */
    enableUtilityNetworkRules?: boolean;
    /**
     * Enable a tooltip that shows the name of the layer that has been snapped
     * to and the type of the snap target, i.e. vertex or edge. Defaults to
     * true.
     */
    enableTooltips?: boolean;
}
