import type Collection from "../../core/Collection.js";
import type Point from "../../geometry/Point.js";
import type CIMSymbol from "../../symbols/CIMSymbol.js";
import type PictureMarkerSymbol from "../../symbols/PictureMarkerSymbol.js";
import type PointSymbol3D from "../../symbols/PointSymbol3D.js";
import type SimpleMarkerSymbol from "../../symbols/SimpleMarkerSymbol.js";
import type Conversion from "./support/Conversion.js";
import type Format from "./support/Format.js";
import type { ReadonlyArrayOrCollection } from "../../core/Collection.js";
import type { EventedAccessor, EventedMixinProperties } from "../../core/Evented.js";
import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js";
import type { Mode, Position } from "../types.js";
import type { ConversionProperties } from "./support/Conversion.js";
import type { GoTo, GoToProperties } from "../support/GoTo.js";
import type { PointProperties } from "../../geometry/Point.js";
import type { FormatProperties } from "./support/Format.js";
import type { CIMSymbolProperties } from "../../symbols/CIMSymbol.js";
import type { PointSymbol3DProperties } from "../../symbols/PointSymbol3D.js";
import type { PictureMarkerSymbolProperties } from "../../symbols/PictureMarkerSymbol.js";
import type { SimpleMarkerSymbolProperties } from "../../symbols/SimpleMarkerSymbol.js";

export interface CoordinateConversionViewModelProperties extends EventedMixinProperties, GoToProperties, Partial<Pick<CoordinateConversionViewModel, "mode" | "storageEnabled" | "storageType" | "view">> {
  /**
   * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Conversion](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html)
   * that is currently displaying.
   *
   * @since 4.7
   * @example
   * // conversions can be set with an array of strings where each string is a format's name
   * coordinateConversion.conversions = ["mgrs"];
   */
  conversions?: ReadonlyArrayOrCollection<ConversionProperties>;
  /**
   * Describes the location of the coordinates currently displayed as a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html).
   * Setting this property will update all [conversions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#conversions).
   *
   * @since 4.7
   */
  currentLocation?: PointProperties | null;
  /**
   * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Format](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html)
   * that is capable of displaying.
   *
   * The default formats are `basemap`, `dd`, `ddm`, `dms`, `mgrs`, `usng`, `utm`, and `xy`.
   */
  formats?: ReadonlyArrayOrCollection<FormatProperties>;
  /**
   * This symbol is used to visualize the location currently, when `capture` mode
   * is active.
   */
  locationSymbol?: (SimpleMarkerSymbolProperties & { type: "simple-marker" }) | (PictureMarkerSymbolProperties & { type: "picture-marker" }) | (PointSymbol3DProperties & { type: "point-3d" }) | (CIMSymbolProperties & { type: "cim" });
}

export type CoordinateConversionViewModelState = "ready" | "loading" | "disabled";

/**
 * Provides the logic for the [CoordinateConversion](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html) widget and [component](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-coordinate-conversion/).
 *
 * @since 4.7
 * @see [CoordinateConversion widget](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html) - _Deprecated since 4.34. Use the [Coordinate Conversion component](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-coordinate-conversion/) instead._
 * @see [Coordinate Conversion component](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-coordinate-conversion/)
 * @see [Sample - CoordinateConversion component](https://developers.arcgis.com/javascript/latest/sample-code/coordinate-conversion/)
 */
export default class CoordinateConversionViewModel extends CoordinateConversionViewModelSuperclass {
  constructor(properties?: CoordinateConversionViewModelProperties);
  /**
   * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Conversion](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html)
   * that is currently displaying.
   *
   * @since 4.7
   * @example
   * // conversions can be set with an array of strings where each string is a format's name
   * coordinateConversion.conversions = ["mgrs"];
   */
  get conversions(): Collection<Conversion>;
  set conversions(value: ReadonlyArrayOrCollection<ConversionProperties>);
  /**
   * Describes the location of the coordinates currently displayed as a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html).
   * Setting this property will update all [conversions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#conversions).
   *
   * @since 4.7
   */
  get currentLocation(): Point | null | undefined;
  set currentLocation(value: PointProperties | null | undefined);
  /**
   * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Format](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html)
   * that is capable of displaying.
   *
   * The default formats are `basemap`, `dd`, `ddm`, `dms`, `mgrs`, `usng`, `utm`, and `xy`.
   */
  get formats(): Collection<Format>;
  set formats(value: ReadonlyArrayOrCollection<FormatProperties>);
  /**
   * This symbol is used to visualize the location currently, when `capture` mode
   * is active.
   */
  get locationSymbol(): SimpleMarkerSymbol | PictureMarkerSymbol | PointSymbol3D | CIMSymbol;
  set locationSymbol(value: (SimpleMarkerSymbolProperties & { type: "simple-marker" }) | (PictureMarkerSymbolProperties & { type: "picture-marker" }) | (PointSymbol3DProperties & { type: "point-3d" }) | (CIMSymbolProperties & { type: "cim" }));
  /**
   * Describes the current mode.
   *
   * * While in `live` mode, updates occur as the cursor moves.
   * * While in `capture` mode, updates occur on mouse click and then display a graphic
   * marking the current location.
   *
   * @default "live"
   * @since 4.7
   */
  accessor mode: Mode;
  /**
   * The view model's state.
   *
   * @default "disabled"
   */
  get state(): CoordinateConversionViewModelState;
  /**
   * If this property is set to `true`, sessionStorage or localStorage (depending on [storageType](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#storageType))
   * will be used to hydrate and persist the CoordinateConversion's state.
   *
   * @default true
   * @since 4.20
   */
  accessor storageEnabled: boolean;
  /**
   * This property determines whether sessionStorage or localStorage will be used to store state.
   *
   * @default "session"
   * @since 4.23
   * @see [Window.sessionStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage)
   * @see [Window.localStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage)
   */
  accessor storageType: "session" | "local";
  /** A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link to a specific view. */
  accessor view: MapViewOrSceneView | null | undefined;
  /**
   * Attempt to convert a point into a [Position](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-types.html#Position).
   *
   * @param format - The format that describes how the point should be converted.
   * @param point - The point to convert.
   * @returns When resolved, returns a [Position](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-types.html#Position).
   */
  convert(format: Format, point: Point): Promise<Position>;
  /**
   * Goes to a location in the view associated with the view model
   *
   * @param point - The location to go to
   * @since 4.34
   * @see [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo)
   */
  goToLocation(point: Point): Promise<void>;
  /**
   * Pauses the view model's operation. See the [resume()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#resume) method
   *
   * @since 4.34
   */
  pause(): void;
  /**
   * Generates a localized coordinate string suitable for display given a [Conversion](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html)
   * and a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html)
   *
   * @param conversion - Specifies the format to use to preview
   * @param location - The position to preview
   */
  previewConversion(conversion: Conversion, location?: Point): Promise<string | null | undefined>;
  /**
   * Resumes the view model's operation. See the [pause()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#pause) method
   *
   * @since 4.34
   */
  resume(): void;
  /**
   * Attempt to convert a string into a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html).  The format of the
   * string must be specified.  A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of available formats can be
   * obtained from the [formats](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#formats) property.
   *
   * @param coordinate - The coordinate string.
   * @param format - Specifies the format of the input coordinate.
   * @returns When resolved, returns a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html).
   */
  reverseConvert(coordinate: string, format: Format): Promise<Point | null | undefined>;
  /**
   * Set the view model's new location to the input [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html)
   *
   * @param point - The point to be set as the new location.
   * @since 4.34
   */
  setLocation(point: Point | null | undefined): void;
  /**
   * Update the input conversions based on the input point.
   *
   * @param conversions - An array of [Conversions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html)
   * to be updated.
   * @param location - A point that will be used to update each input conversion.
   * @returns When resolved, returns an array of
   * [Conversions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html) with updated [Positions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-types.html#Position).
   */
  updateConversions(conversions: Conversion[], location: Point | null | undefined): Promise<Conversion[]>;
}
declare const CoordinateConversionViewModelSuperclass: typeof EventedAccessor & typeof GoTo