import type { JSONSupport, JSONSupportMixinProperties } from "../core/JSONSupport.js";

export interface LayerOptionsProperties extends JSONSupportMixinProperties, Partial<Pick<LayerOptions, "returnTopmostRaster" | "showNoDataRecords">> {}

/**
 * The `LayerOptions` class defines additional options that can be
 * defined for a layer's [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html).
 *
 * @since 4.11
 * @see [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html)
 * @see [Sample - Intro to PopupTemplate](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/)
 * @see [Sample - Multiple popup elements](https://developers.arcgis.com/javascript/latest/sample-code/popup-multipleelements/)
 * @example
 * popupTemplate: {
 *   "title": "ScientificData/SeaTemperature:{ProductName}",
 *   content: [{
 *     type: "fields",
 *     "fieldInfos": [{
 *       "fieldName": "Raster.ItemPixelValue",
 *       "label": "Item Pixel Value",
 *       "isEditable": false,
 *       "visible": true,
 *       "format": {
 *         "places": 2,
 *         "digitSeparator": true
 *       }
 *     }],
 *   "layerOptions": {
 *     "showNoDataRecords": true
 *   }
 *   }]
 * }
 */
export default class LayerOptions extends JSONSupport {
  constructor(properties?: LayerOptionsProperties);
  /**
   * Applicable to [Imagery Layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html).
   * Indicates whether or not only the topmost raster should be displayed.
   *
   * @default false
   */
  accessor returnTopmostRaster: boolean | null | undefined;
  /**
   * Applicable to [Imagery Layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html).
   * Indicates whether records without data should display within the popup.
   *
   * @default true
   */
  accessor showNoDataRecords: boolean | null | undefined;
  /**
   * Creates a deep clone of the LayerOptions class.
   *
   * @returns A deep clone of the LayerOptions instance.
   */
  clone(): LayerOptions;
}