import type Accessor from "../../../core/Accessor.js";
import type GridControlsVisibleElements from "../GridControls/VisibleElements.js";
import type { VisibleElementsProperties } from "../GridControls/VisibleElements.js";

export interface SnappingControlsVisibleElementsProperties extends Partial<Pick<SnappingControlsVisibleElements, "enabledToggle" | "featureEnabledToggle" | "gridControls" | "gridEnabledToggle" | "header" | "layerList" | "layerListToggleLayersButton" | "selfEnabledToggle">> {
  /** _Since 4.30_. The available [GridControls](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-GridControls.html) elements within the widget. */
  gridControlsElements?: VisibleElementsProperties;
}

/**
 * The visible elements that are displayed within the widget.
 * This provides the ability to toggle visibility for individual elements within the widget.
 *
 * @example
 * // Setting visibleElements on SnappingControls
 * const snappingControls = new SnappingControls({
 *   view,
 *   visibleElements: {
 *     selfEnabledToggle: false,
 *     gridControlsElements: {
 *       colorSelection: false,
 *       gridEnabledToggle: false
 *     }
 *   }
 * });
 */
export default abstract class SnappingControlsVisibleElements extends Accessor {
  /**
   * Indicates whether to display the `enabledToggle` (Enable snapping). Default is `true`. This toggles
   * the [SnappingOptions#enabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html#enabled) property.
   * > [!WARNING]
   * >
   * > **Note**
   * >
   * > It is recommended to set `SnappingControls.snappingOptions.enabled = true` if `enabledToggle` is set to `false`.
   * > This is because `selfEnabledToggle` and `featureEnabledToggle` require snapping globally to be enabled in order to be interactive. Otherwise, these toggles will not be responsive.
   *
   * @default true
   */
  accessor enabledToggle: boolean;
  /**
   * Indicates whether to display the `featureEnabledToggle` (Feature to feature). Default is `true`. This toggles
   * the [SnappingOptions#featureEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html#featureEnabled) property.
   *
   * @default true
   */
  accessor featureEnabledToggle: boolean;
  /**
   * _Since 4.30_. Indicates whether to display the grid controls widget embedded in snapping controls. Default is `true`.
   *
   * @default true
   */
  accessor gridControls: boolean;
  /** _Since 4.30_. The available [GridControls](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-GridControls.html) elements within the widget. */
  get gridControlsElements(): GridControlsVisibleElements;
  set gridControlsElements(value: VisibleElementsProperties);
  /**
   * _Since 4.30_. Indicates whether to display the grid display toggle embedded in grid controls. Default is `true`.
   *
   * @default true
   */
  accessor gridEnabledToggle: boolean;
  /**
   * Indicates whether to display the header. Default is `false`.
   *
   * @default false
   */
  accessor header: boolean;
  /**
   * Indicates whether to display the [FeatureSnappingLayerSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-FeatureSnappingLayerSource.html) layerList. Default is `true`. The layerlist provides the available layer sources supported for snapping.
   *
   * @default true
   */
  accessor layerList: boolean;
  /**
   * Indicates whether to display the “Enable all” or “Disable all” button to enable / disable snapping for all the layers in the list.
   * ![layerlist-toggle-layers-btn](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/snapping-controls/layerlist-toggle-layers-btn.png)
   *
   * @default true
   */
  accessor layerListToggleLayersButton: boolean;
  /**
   * Indicates whether to display the `selfEnabledToggle` (Geometry guides). Default is `true`. This toggles
   * the [SnappingOptions#selfEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html#selfEnabled) property.
   *
   * @default true
   */
  accessor selfEnabledToggle: boolean;
}