import type Accessor from "../../../core/Accessor.js";
import type SnappingOptions from "../../../views/interactive/snapping/SnappingOptions.js";
import type { MapViewOrSceneView } from "../../../views/MapViewOrSceneView.js";
import type { SnappingOptionsProperties } from "../../../views/interactive/snapping/SnappingOptions.js";

export interface SnappingControlsViewModelProperties extends Partial<Pick<SnappingControlsViewModel, "view">> {
  /** The [SnappingOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html) for sketching. It supports [self](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html#selfEnabled) and [feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html#featureEnabled) snapping. */
  snappingOptions?: SnappingOptionsProperties;
}

export type SnappingControlsViewModelState = "ready" | "disabled";

/**
 * Provides the logic for the [SnappingControls](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-SnappingControls.html) widget.
 *
 * @since 4.21
 * @see [SnappingControls](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-SnappingControls.html)
 * @see [SnappingOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html)
 * @see [Sketch](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html)
 */
export default class SnappingControlsViewModel extends Accessor {
  constructor(properties?: SnappingControlsViewModelProperties);
  /** The [SnappingOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html) for sketching. It supports [self](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html#selfEnabled) and [feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html#featureEnabled) snapping. */
  get snappingOptions(): SnappingOptions;
  set snappingOptions(value: SnappingOptionsProperties);
  /**
   * The current state of the view model.
   *
   * @default "disabled"
   */
  get state(): SnappingControlsViewModelState;
  /** The view associated with the SnappingControls widget instance. */
  accessor view: MapViewOrSceneView | null | undefined;
}