import { EventEmitter } from '../../stencil-public-runtime';
import type { LatLng } from 'leaflet';
interface Bounds {
  layerType: LayerType;
  _northEast: LatLng;
  _southWest: LatLng;
  lat: number;
  lng: number;
  radius: number;
}
interface SpatialPoint {
  lat: number;
  lng: number;
}
interface SpatialRadius {
  lat: number;
  lng: number;
  radius: {
    unit: unit;
    value: number;
  };
}
export declare type SpatialRange = string | SpatialPoint | SpatialRadius;
declare type unit = 'km' | 'm' | 'mi' | 'rad' | 'deg';
declare type LayerType = 'rectangle' | 'circle' | 'marker';
interface ErrorMessage {
  layerType: LayerType;
  invalid: boolean;
  message: string;
}
export declare class SpatialPicker {
  label: string;
  showMapIcon: boolean;
  value: SpatialRange;
  precision: number;
  minZoom: number;
  maxZoom: number;
  zoom: number;
  latitude: number;
  longitude: number;
  fitWorld: boolean;
  mapWidth: number;
  mapHeight: number;
  autocomplete: boolean;
  /**
   * use to enable circle draw
   */
  circleDraw: boolean;
  /**
   * use to enable marker draw
   */
  markerDraw: boolean;
  /**
   * use to disable spatial picker
   */
  disabled: boolean;
  /**
   * use spatial picker as an icon instead of default input.
   */
  useAsIcon: boolean;
  /**
   * marker icon for map
   */
  markerIconUrl: string;
  /**
   * marker shadow icon for map
   */
  markerIconShadowUrl: string;
  spatialPickerInit: EventEmitter;
  valueChanged: EventEmitter;
  isInvalid: EventEmitter;
  clearSpatialInput: EventEmitter;
  /**
   * Internal State for all selected fields
   */
  selectedArea: string;
  selectedCircleLat: number;
  selectedCircleLng: number;
  selectedCircleRad: number;
  selectedCircleRadUnit: 'km' | 'm' | 'mi' | 'rad' | 'deg';
  selectedMarkerLat: number;
  selectedMarkerLng: number;
  displayMap: boolean;
  invalid: boolean;
  /**
   * Error Message for invalid bounding box
   */
  errorMessage: ErrorMessage;
  selectedLayerType: 'rectangle' | 'circle' | 'marker';
  el: HTMLElement;
  map: any;
  inputEl: any;
  mapDrawSelectedHandler(event: any): void;
  componentDidLoad(): void;
  handleMapInit(map: any): void;
  isCircle(value: SpatialRange): boolean;
  isPoint(value: SpatialRange): boolean;
  /**
   * function is only called when a draw is triggered from the map
   * @param bounds
   */
  handleDraw(bounds: Bounds): void;
  onValueChanged(value: SpatialRange, formatPrecision?: boolean): void;
  handleSpatialAreaChanged(area: any): void;
  handleCircleAreaChanged(circle: SpatialRadius): void;
  handleMarkerAreaChanged(marker: SpatialPoint): void;
  formatValueToPrecision(value: any, precision: any): any;
  drawSpatialArea(area: any): void;
  showMapDisplay(): void;
  showMap(): void;
  resetRange(): void;
  isNumber: (value: any) => boolean;
  validateBbox(value: string): ErrorMessage;
  /**
   * https://stackoverflow.com/questions/17369098/simplest-way-of-getting-the-number-of-decimals-in-a-number-in-javascript
   * @param value
   * @returns
   */
  countDecimals: (value: any) => any;
  isLatitude: (coord: any) => boolean;
  isLongitude: (coord: any) => boolean;
  increasingCoordinates: (box: any) => boolean;
  validateCircle(circle: SpatialRadius): ErrorMessage;
  validatePoint(point: any): ErrorMessage;
  handleCircleLatitudeChange(event: any): void;
  handleCircleLongitudeChange(event: any): void;
  handleCircleRadiusChange(event: any): void;
  handleCircleUnitChange(event: any): void;
  handleMarkerLatitudeChange(event: any): void;
  handleMarkerLongitudeChange(event: any): void;
  handleBboxChange(event: any): void;
  renderMap(): any;
  renderMapContainer(): any;
  render(): any;
}
export {};
