import type Accessor from "../../core/Accessor.js";
import type Collection from "../../core/Collection.js";
import type Layer from "../../layers/Layer.js";
import type MapView from "../../views/MapView.js";
import type { ReadonlyArrayOrCollection } from "../../core/Collection.js";
import type { Direction, State } from "./types.js";

export interface SwipeViewModelProperties extends Partial<Pick<SwipeViewModel, "direction" | "position" | "step" | "stepMultiplier" | "view">> {
  /**
   * A collection of [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html)s that will show on the left or top side of the Swipe.
   * See the image in the [Swipe](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe.html) class description.
   *
   * @see [trailingLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe-SwipeViewModel.html#trailingLayers)
   */
  leadingLayers?: ReadonlyArrayOrCollection<Layer>;
  /**
   * A collection of [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html)s that will show on the right or bottom side of the Swipe.
   * See the image in the [Swipe](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe.html) class description.
   *
   * @see [leadingLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe-SwipeViewModel.html#leadingLayers)
   */
  trailingLayers?: ReadonlyArrayOrCollection<Layer>;
}

/**
 * Provides the logic for the [Swipe widget](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe.html) and [component](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-swipe/).
 *
 * @since 4.13
 * @see [Swipe widget](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe.html) - _Deprecated since 4.32. Use the [Swipe component](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-swipe/) instead._
 * @see [Programming patterns: Widget viewModel pattern](https://developers.arcgis.com/javascript/latest/programming-patterns/#widget-viewmodel-pattern)
 */
export default class SwipeViewModel extends Accessor {
  constructor(properties?: SwipeViewModelProperties);
  /**
   * The direction the Swipe moves across the view.
   * If `"horizontal"`, it will move left and right and
   * if `"vertical"`, it will move up and down.
   *
   * | horizontal | vertical |
   * |------------|----------|
   * |[![widgets-swipe-horizontal](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/widgets-swipe-horizontal.png)](https://developers.arcgis.com/javascript/latest/sample-code/swipe/) |[![widgets-swipe-vertical](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/widgets-swipe-vertical.png)](https://developers.arcgis.com/javascript/latest/sample-code/swipe/)|
   *
   * @default "horizontal"
   */
  accessor direction: Direction;
  /**
   * A collection of [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html)s that will show on the left or top side of the Swipe.
   * See the image in the [Swipe](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe.html) class description.
   *
   * @see [trailingLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe-SwipeViewModel.html#trailingLayers)
   */
  get leadingLayers(): Collection<Layer>;
  set leadingLayers(value: ReadonlyArrayOrCollection<Layer>);
  /**
   * The maximum position of the Swipe, as a percentage.
   *
   * @since 4.32
   */
  get max(): 100;
  /**
   * The minimum position of the Swipe, as a percentage.
   *
   * @since 4.32
   */
  get min(): 0;
  /**
   * The position of the Swipe. This determines what percentage
   * of the view will be taken up by the [leadingLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe-SwipeViewModel.html#leadingLayers).
   *
   * @default 25
   */
  accessor position: number;
  /**
   * The current state of the Swipe.
   *
   * @default "disabled"
   */
  get state(): State;
  /**
   * The step value used to increment or decrement the position of the Swipe when using keyboard navigation.
   *
   * @default 0.5
   * @since 4.32
   */
  accessor step: number;
  /**
   * The multiplier used to increase the [step](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe-SwipeViewModel.html#step) value when the `Shift` key is pressed in combination with one of the arrow keys.
   *
   * @default 10
   * @since 4.32
   */
  accessor stepMultiplier: number;
  /**
   * A collection of [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html)s that will show on the right or bottom side of the Swipe.
   * See the image in the [Swipe](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe.html) class description.
   *
   * @see [leadingLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe-SwipeViewModel.html#leadingLayers)
   */
  get trailingLayers(): Collection<Layer>;
  set trailingLayers(value: ReadonlyArrayOrCollection<Layer>);
  /** A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). Set this to link the Swipe to a specific view. */
  accessor view: MapView | null | undefined;
}