import type Accessor from "../../core/Accessor.js";
import type CreateToolVisibilityMap from "./CreateToolVisibilityMap.js";
import type SelectionToolVisibilityMap from "./SelectionToolVisibilityMap.js";
import type SnappingControlsVisibleElements from "../support/SnappingControls/VisibleElements.js";
import type { CreateToolVisibilityMapProperties } from "./CreateToolVisibilityMap.js";
import type { SelectionToolVisibilityMapProperties } from "./SelectionToolVisibilityMap.js";
import type { SnappingControlsVisibleElementsProperties } from "../support/SnappingControls/VisibleElements.js";

/** @since 5.0 */
export interface VisibleElementsProperties extends Partial<Pick<VisibleElements, "deleteButton" | "duplicateButton" | "geometrySimplificationActivityIndicator" | "labelsToggle" | "selectionCountLabel" | "settingsMenu" | "snappingControls" | "tooltipsToggle" | "undoRedoMenu">> {
  /**
   * The available sketch tools within the widget.
   *
   * @since 5.0
   */
  createTools?: CreateToolVisibilityMapProperties;
  /**
   * The available selection tools within the widget.
   * > [!WARNING]
   * >
   * > **Known Limitation**
   * >
   * > Rectangle and lasso selection is only supported when working with a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/).
   *
   * @since 5.0
   */
  selectionTools?: SelectionToolVisibilityMapProperties;
  /**
   * The available [SnappingControls](https://developers.arcgis.com/javascript/latest/references/core/widgets/support/SnappingControls/) elements within the widget.
   *
   * @since 5.0
   */
  snappingControlsElements?: SnappingControlsVisibleElementsProperties;
}

/**
 * The visible elements that are displayed within the widget.
 * This provides the ability to turn individual elements of the widget's display on/off.
 *
 * @since 5.0
 * @example
 * // This hides the lasso selection tools
 * sketch.visibleElements = {
 *   selectionTools: {
 *     "lasso-selection": false
 *   }
 * }
 * @example
 * // This removes the feature enabled snapping toggle and the layerlist.
 * sketch.visibleElements = {
 *   snappingControlsElements: {
 *     featureEnabledToggle: false,
 *     layerList: false
 *   }
 * }
 * @example
 * // This hides the undo/redo tools
 * sketch.visibleElements = {
 *   undoRedoMenu: false
 * }
 */
export default class VisibleElements extends Accessor {
  constructor(properties?: VisibleElementsProperties);
  /**
   * The available sketch tools within the widget.
   *
   * @since 5.0
   */
  get createTools(): CreateToolVisibilityMap;
  set createTools(value: CreateToolVisibilityMapProperties);
  /**
   * Indicates whether to display the 'delete' button while a graphic is selected. Default is `true`. Do not hide this button without giving users on touch devices another way to delete selected geometries.
   *
   * @default true
   * @since 5.0
   */
  accessor deleteButton: boolean;
  /**
   * Indicates whether to display the 'duplicate' button while a graphic is selected. Default is `true`.
   *
   * @default true
   * @since 5.0
   */
  accessor duplicateButton: boolean;
  /**
   * Indicates whether to display the geometry simplification progress indicator while geometry simplification is in progress.
   * Default value is `true`.
   *
   * When set to `false`, the progress indicator is not shown. You can use
   * [SketchViewModel.geometrySimplificationInProgress](https://developers.arcgis.com/javascript/latest/references/core/widgets/Sketch/SketchViewModel/#geometrySimplificationInProgress) to detect this state and implement
   * alternative UI.
   *
   * @default true
   * @remarks
   * Before 5.1, simplification of geometries was done synchronously on the main thread. With the
   * introduction of support for true curves, this simplification step can take some time (multiple seconds)
   * in extreme cases. At 5.1, simplification is asynchronous and Sketch is disabled during simplification.
   * If this process takes a significant amount of time, an activity indicator is shown.
   * This property only affects rendering of that indicator.
   * @since 5.1
   */
  accessor geometrySimplificationActivityIndicator: boolean;
  /**
   * Indicates whether to display the sketch labels toggle. Default value is `true`.
   *
   * @default true
   * @since 5.0
   */
  accessor labelsToggle: boolean;
  /**
   * Indicates whether to display a label indicating the length of the currently selected feature set.
   *
   * @default true
   * @since 5.0
   */
  accessor selectionCountLabel: boolean;
  /**
   * The available selection tools within the widget.
   * > [!WARNING]
   * >
   * > **Known Limitation**
   * >
   * > Rectangle and lasso selection is only supported when working with a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/).
   *
   * @since 5.0
   */
  get selectionTools(): SelectionToolVisibilityMap;
  set selectionTools(value: SelectionToolVisibilityMapProperties);
  /**
   * Indicates whether to display the settings menu. Currently this menu contains snapping options. Default value is `true`.
   *
   * @default true
   * @since 5.0
   */
  accessor settingsMenu: boolean;
  /**
   * Indicates whether to display the `SnappingControls` widget. Default is `true`.
   *
   * @default true
   * @since 5.0
   */
  accessor snappingControls: boolean;
  /**
   * The available [SnappingControls](https://developers.arcgis.com/javascript/latest/references/core/widgets/support/SnappingControls/) elements within the widget.
   *
   * @since 5.0
   */
  get snappingControlsElements(): SnappingControlsVisibleElements;
  set snappingControlsElements(value: SnappingControlsVisibleElementsProperties);
  /**
   * Indicates whether to display the tooltips toggle. Default value is `true`.
   *
   * @default true
   * @since 5.0
   */
  accessor tooltipsToggle: boolean;
  /**
   * Indicates whether to display the undo/redo menu within the widget. Default is `true`.
   *
   * @default true
   * @since 5.0
   */
  accessor undoRedoMenu: boolean;
}