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";

export interface VisibleElementsProperties extends Partial<Pick<VisibleElements, "deleteButton" | "duplicateButton" | "labelsToggle" | "selectionCountLabel" | "settingsMenu" | "snappingControls" | "tooltipsToggle" | "undoRedoMenu">> {
  /** The available sketch tools within the widget. */
  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/api-reference/esri-views-MapView.html).
   */
  selectionTools?: SelectionToolVisibilityMapProperties;
  /** The available [SnappingControls](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-SnappingControls.html) elements within the widget. */
  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.
 *
 * @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 abstract class VisibleElements extends Accessor {
  /** The available sketch tools within the widget. */
  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
   */
  accessor deleteButton: boolean;
  /**
   * Indicates whether to display the 'duplicate' button while a graphic is selected. Default is `true`.
   *
   * @default true
   */
  accessor duplicateButton: boolean;
  /**
   * _Since 4.29_. Indicates whether to display the sketch labels toggle. Default value is `true`.
   *
   * @default true
   */
  accessor labelsToggle: boolean;
  /**
   * Indicates whether to display a label indicating the length of the currently selected feature set.
   *
   * @default true
   */
  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/api-reference/esri-views-MapView.html).
   */
  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
   */
  accessor settingsMenu: boolean;
  /**
   * Indicates whether to display the `SnappingControls` widget. Default is `true`.
   *
   * @default true
   */
  accessor snappingControls: boolean;
  /** The available [SnappingControls](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-SnappingControls.html) elements within the widget. */
  get snappingControlsElements(): SnappingControlsVisibleElements;
  set snappingControlsElements(value: SnappingControlsVisibleElementsProperties);
  /**
   * _Since 4.29_. Indicates whether to display the tooltips toggle. Default value is `true`.
   *
   * @default true
   */
  accessor tooltipsToggle: boolean;
  /**
   * Indicates whether to display the undo/redo menu within the widget. Default is `true`.
   *
   * @default true
   */
  accessor undoRedoMenu: boolean;
}