/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import { a as m } from "./utils.js";
import { g as h, s as y, a as g, b as f, c as p, d, e as c, f as S, h as b, i as v, j as u, k as _, l as D, m as M, n as O, o as w, p as C, q as W, r as T, t as x, u as A, v as N, w as L, x as E, y as F, z as X, A as B } from "./histogram-data.js";
import { C as P } from "./chart-model.js";
import { M as j, a as H, W as I, b as V } from "./model-with-tooltips.js";
import { W as G } from "./data-labels-symbol.js";
import { W as q, b as z } from "./model-with-guides.js";
import { W as Y, a as k, b as J } from "./axis-lines-symbol.js";
import { W as K, a as Q, b as R } from "./generate-x-axis-title.js";
import { m as s } from "./model-setter.js";
import { W as U } from "./series-types.js";
import { bv as Z } from "./index.js";
import { M as $, a as tt } from "./model-with-y-guides.js";
var et = Object.defineProperty, st = Object.getOwnPropertyDescriptor, o = (i, t, r, at) => {
  for (var a = st(t, r), n = i.length - 1, l; n >= 0; n--)
    (l = i[n]) && (a = l(t, r, a) || a);
  return a && et(t, r, a), a;
};
class e extends P {
  constructor() {
    super(...arguments), this._chartType = U.HistogramSeries;
  }
  async setup(t) {
    await this.loadConfigFromLayer(t), typeof this.resolveSetup == "function" && this.resolveSetup();
  }
  // ---------------------------------------------------------------------------------------------
  // #region Data Props
  // ---------------------------------------------------------------------------------------------
  /**
   * Numeric field used to create the histogram to visualize the frequency distribution of its values.
   */
  get numericField() {
    return h(this._config);
  }
  set numericField(t) {
    y({
      numericField: t,
      config: this._config,
      layerInfo: this.layerInfo,
      commonStrings: this.commonStrings
    }), this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"));
  }
  /**
   * Number of bins used to create the histogram.
   */
  get binCount() {
    return g(this._config);
  }
  set binCount(t) {
    f(t, this._config), this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"));
  }
  /**
   * Fill symbol used for the bins in the histogram.
   *
   * @example
   * ```ts
   * histogramModel.binSymbol = {
   *  style: "esriSFSForwardDiagonal",
   *  color: [0, 255, 0, 100],
   * };
   * ```
   */
  get binSymbol() {
    return p(this._config);
  }
  set binSymbol(t) {
    d(t, this._config);
  }
  /**
   * Data transformation type used in the histogram.
   * `none`: No data transformation is applied to the histogram.
   * `logarithmic`: Data is transformed using logarithm function. It can only be
   * `squareRoot`: Data is transformed using square root function. It can only be applied to numbers greater than or equal to zero.
   */
  get dataTransformationType() {
    return c(this._config);
  }
  set dataTransformationType(t) {
    S(t, this._config), this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"));
  }
  /**
   * Line symbol used for the mean overlay in the histogram.
   */
  get meanSymbol() {
    return b(this._config);
  }
  set meanSymbol(t) {
    v(t, this._config);
  }
  /**
   * Line symbol used for the median overlay in the histogram.
   */
  get medianSymbol() {
    return u(this._config);
  }
  set medianSymbol(t) {
    _(t, this._config);
  }
  /**
   * Line symbol used for the normal distribution overlay in the histogram.
   */
  get normalDistSymbol() {
    return D(this._config);
  }
  set normalDistSymbol(t) {
    M(t, this._config);
  }
  /**
   * Line symbol used for the standard deviation overlay in the histogram.
   */
  get standardDevSymbol() {
    return O(this._config);
  }
  set standardDevSymbol(t) {
    w(t, this._config);
  }
  /**
   * Whether the normal distribution overlay is shown in the histogram.
   */
  get showNormalDistOverlay() {
    return C(this._config);
  }
  set showNormalDistOverlay(t) {
    W(t, this._config);
  }
  /**
   * Whether the mean overlay is shown in the histogram.
   */
  get showMeanOverlay() {
    return T(this._config);
  }
  set showMeanOverlay(t) {
    x(t, this._config);
  }
  /**
   * Whether the median overlay is shown in the histogram.
   */
  get showMedianOverlay() {
    return A(this._config);
  }
  set showMedianOverlay(t) {
    N(t, this._config);
  }
  /**
   * Whether the standard deviation overlay is shown in the histogram.
   */
  get showStandardDevOverlay() {
    return L(this._config);
  }
  set showStandardDevOverlay(t) {
    E(t, this._config);
  }
  /**
   * Chart overlays for the histogram: **mean**, **median**, **standardDeviation** and **comparisonDistribution**.
   */
  get seriesOverlays() {
    return F(this._config);
  }
  set seriesOverlays(t) {
    X(t, this._config);
  }
  // ---------------------------------------------------------------------------------------------
  // #region General methods
  // ---------------------------------------------------------------------------------------------
  /**
   * Generate the proper chart title given the current config.
   */
  generateChartTitle() {
    return B(this._config, this.layerInfo, this.commonStrings);
  }
  // ---------------------------------------------------------------------------------------------
  // #region Protected methods
  // ---------------------------------------------------------------------------------------------
  /** @private */
  generateDefaultConfig() {
    return Z(this.commonStrings);
  }
}
o([
  s
], e.prototype, "numericField");
o([
  s
], e.prototype, "binCount");
o([
  s
], e.prototype, "binSymbol");
o([
  s
], e.prototype, "dataTransformationType");
o([
  s
], e.prototype, "meanSymbol");
o([
  s
], e.prototype, "medianSymbol");
o([
  s
], e.prototype, "normalDistSymbol");
o([
  s
], e.prototype, "standardDevSymbol");
o([
  s
], e.prototype, "showNormalDistOverlay");
o([
  s
], e.prototype, "showMeanOverlay");
o([
  s
], e.prototype, "showMedianOverlay");
o([
  s
], e.prototype, "showStandardDevOverlay");
o([
  s
], e.prototype, "seriesOverlays");
const ot = [
  $,
  j,
  H,
  I,
  V,
  G,
  tt,
  K,
  q,
  Q,
  z,
  Y,
  k,
  J,
  R
];
m(e, ot);
export {
  e as HistogramModel
};
