import type AuthoringInfoFieldInfo from "./AuthoringInfoFieldInfo.js";
import type AuthoringInfoVisualVariable from "./AuthoringInfoVisualVariable.js";
import type ColorRamp from "../../rest/support/ColorRamp.js";
import type { JSONSupport, JSONSupportMixinProperties } from "../../core/JSONSupport.js";
import type { RelationshipNumClasses } from "../types.js";
import type { AuthoringInfoTypes, AuthoringInfoLengthUnits, UnivariateTheme, FlowTheme, UnivariateSymbolStyle, AuthoringInfoClassificationMethods, RelationshipFocus, AuthoringInfoStatistics, StandardDeviationInterval } from "./types.js";
import type { ColorRampProperties } from "../../rest/support/ColorRamp.js";
import type { AuthoringInfoFieldInfoProperties } from "./AuthoringInfoFieldInfo.js";
import type { AuthoringInfoVisualVariableProperties } from "./AuthoringInfoVisualVariable.js";

export interface AuthoringInfoProperties extends JSONSupportMixinProperties, Partial<Pick<AuthoringInfo, "classificationMethod" | "fadeRatio" | "fields" | "flowTheme" | "focus" | "isAutoGenerated" | "lengthUnit" | "maxSliderValue" | "minSliderValue" | "numClasses" | "standardDeviationInterval" | "type" | "univariateSymbolStyle" | "univariateTheme">> {
  /** Indicates the color ramp was used to create the symbols for Unique Value or Class Breaks renderer for Imagery Layer. */
  colorRamp?: ColorRampProperties | null;
  /**
   * A numeric field used for generating a [relationship renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-relationship.html)
   * along with [field2](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AuthoringInfo.html#field2). In the default visualization,
   *   the values of this field are rendered along the vertical axis of the [Legend](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-legend/).
   */
  field1?: AuthoringInfoFieldInfoProperties | null;
  /**
   * A numeric field used for generating a [relationship renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-relationship.html)
   * along with [field1](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AuthoringInfo.html#field1). In the default visualization,
   *   the values of this field are rendered along the horizontal axis of the [Legend](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-legend/).
   */
  field2?: AuthoringInfoFieldInfoProperties | null;
  /**
   * Only for renderers of type `univariate-color-size` with an `above-and-below` [univariateTheme](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AuthoringInfo.html#univariateTheme). Contains summary statistics about the data represented by the renderer. The [Legend](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-legend/) can use this information to avoid displaying values beyond the `min` and `max` data values of the layer.
   *
   * @since 4.18
   */
  statistics?: {
      min: number;
      max: number;
  } | null;
  /**
   * Contains authoring properties of visual variables generated from
   * one of the Smart Mapping methods or sliders.
   */
  visualVariables?: AuthoringInfoVisualVariableProperties[];
}

/**
 * Authoring information related to generating renderers
 * and visual variables with the Smart Mapping methods. This includes information from UI
 * elements such as sliders and selected classification methods
 * and themes. This allows the authoring clients to save settings
 * so that their selections can be remembered.
 *
 * @since 4.6
 * @see [Sample - Multivariate data exploration](https://developers.arcgis.com/javascript/latest/sample-code/visualization-sm-multivariate/)
 */
export default class AuthoringInfo extends JSONSupport {
  constructor(properties?: AuthoringInfoProperties);
  /**
   * Indicates which classification method was used if a
   * classed color or classed size renderer was generated using one of the Smart Mapping functions.
   *
   * @see [colorRendererCreator.createClassBreaksRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-color.html#createClassBreaksRenderer)
   * @see [sizeRendererCreator.createClassBreaksRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-size.html#createClassBreaksRenderer)
   */
  accessor classificationMethod: AuthoringInfoClassificationMethods | null | undefined;
  /** Indicates the color ramp was used to create the symbols for Unique Value or Class Breaks renderer for Imagery Layer. */
  get colorRamp(): ColorRamp | null | undefined;
  set colorRamp(value: ColorRampProperties | null | undefined);
  /**
   * Only applicable to [HeatmapRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-HeatmapRenderer.html)
   * created with the [heatmap renderer creator](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-heatmap.html).
   * Indicates how much the user opted to fade the edges of the heatmap to transparent.
   *
   * @since 4.25
   */
  accessor fadeRatio: number | null | undefined;
  /**
   * A numeric field used for generating a [relationship renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-relationship.html)
   * along with [field2](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AuthoringInfo.html#field2). In the default visualization,
   *   the values of this field are rendered along the vertical axis of the [Legend](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-legend/).
   */
  get field1(): AuthoringInfoFieldInfo | null | undefined;
  set field1(value: AuthoringInfoFieldInfoProperties | null | undefined);
  /**
   * A numeric field used for generating a [relationship renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-relationship.html)
   * along with [field1](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AuthoringInfo.html#field1). In the default visualization,
   *   the values of this field are rendered along the horizontal axis of the [Legend](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-legend/).
   */
  get field2(): AuthoringInfoFieldInfo | null | undefined;
  set field2(value: AuthoringInfoFieldInfoProperties | null | undefined);
  /** An array of string values representing field names used for creating a [predominance renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-predominance.html). */
  accessor fields: string[] | null | undefined;
  /**
   * Only applicable to {@link smartMapping/renderers/flow} renderers. Indicates the user-selected theme of the generated renderer.
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > The `wave-front` flow theme is not supported in 3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
   *
   * @since 4.23
   */
  accessor flowTheme: FlowTheme | null | undefined;
  /**
   * The focus of a [relationship renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-relationship.html). This
   * determines the orientation of the legend.
   */
  accessor focus: RelationshipFocus | null | undefined;
  /**
   * Indicates whether the renderer was created internally by the JS API's rendering engine for
   * default [FeatureReductionCluster](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureReductionCluster.html) visualizations. You should avoid
   * setting or changing this value.
   *
   * @default false
   */
  accessor isAutoGenerated: boolean;
  /** **Only applicable to renderer used in web scenes.** Indicates the unit used in real-world sizes. */
  accessor lengthUnit: AuthoringInfoLengthUnits | null | undefined;
  /** Indicates the value of the upper handle if a slider was used to generate the dot value for dot density renderer. */
  accessor maxSliderValue: number | null | undefined;
  /** Indicates the value of the lower handle if a slider was used to generate the dot value for dot density renderer. */
  accessor minSliderValue: number | null | undefined;
  /**
   * The number of classes used to classify each field of a [relationship renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-relationship.html). This
   * determines the number of categories in the legend.
   */
  accessor numClasses: RelationshipNumClasses | null | undefined;
  /**
   * Indicates the standard deviation interval for each stop in a classed color or
   * classed size renderer that was generated using the `standard-deviation` classification method.
   *
   * **Possible Values:** 0.25 | 0.33 | 0.5 | 1
   */
  accessor standardDeviationInterval: StandardDeviationInterval | null | undefined;
  /**
   * Only for renderers of type `univariate-color-size` with an `above-and-below` [univariateTheme](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AuthoringInfo.html#univariateTheme). Contains summary statistics about the data represented by the renderer. The [Legend](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-legend/) can use this information to avoid displaying values beyond the `min` and `max` data values of the layer.
   *
   * @since 4.18
   */
  get statistics(): AuthoringInfoStatistics | null | undefined;
  set statistics(value: {
      min: number;
      max: number;
  } | null | undefined);
  /** Indicates the renderer type generated from one of the Smart Mapping functions. */
  accessor type: AuthoringInfoTypes;
  /**
   * Only applicable to [univariateColorSize](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-univariateColorSize.html) renderers with an `above-and-below` [univariateTheme](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AuthoringInfo.html#univariateTheme). Indicates if the above and below renderer uses a predefined symbol pair provided by the API.
   *
   * The `custom` style indicates the renderer was authored with custom symbols not provided as a predefined symbol pair in the renderer creator.
   *
   * @since 4.18
   */
  accessor univariateSymbolStyle: UnivariateSymbolStyle | null | undefined;
  /**
   * Only applicable to [univariateColorSize](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-univariateColorSize.html) renderers. Indicates the theme of the univariate color and size renderer.
   *
   * @since 4.18
   */
  accessor univariateTheme: UnivariateTheme | null | undefined;
  /**
   * Contains authoring properties of visual variables generated from
   * one of the Smart Mapping methods or sliders.
   */
  get visualVariables(): AuthoringInfoVisualVariable[];
  set visualVariables(value: AuthoringInfoVisualVariableProperties[]);
  /**
   * Creates a deep clone of the instance.
   *
   * @returns A deep clone of the object that
   * invoked this method.
   * @example
   * // Creates a deep clone of the layer's authoring info
   * let authInfo = layer.renderer.authoringInfo.clone();
   */
  clone(): AuthoringInfo;
}