/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import { C as l, m as a } from "./model-setter.js";
import { g as x, b as m, c as f, d } from "./utils2.js";
import "@arcgis/toolkit/intl";
import "lodash-es";
import "luxon";
import "d3-array";
import "@arcgis/toolkit/type";
import "./series-types.js";
import { d3 as n, ay as h } from "./index.js";
import "@arcgis/core/Graphic.js";
import "@arcgis/core/renderers/support/jsonUtils.js";
import "@arcgis/core/symbols/support/symbolUtils.js";
import "@arcgis/core/intl.js";
import "@arcgis/core/layers/support/FeatureFilter.js";
import "@arcgis/core/smartMapping/statistics/histogram.js";
import "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
import "simple-statistics";
import "@arcgis/core/request.js";
import "@arcgis/core/core/sql.js";
import "@arcgis/core/AttributeBinsGraphic.js";
import "@arcgis/core/geometry/support/jsonUtils.js";
import "@arcgis/core/rest/support/AttributeBinsQuery.js";
import "@arcgis/core/rest/support/StatisticDefinition.js";
import "@arcgis/core/time/TimeExtent.js";
import "@arcgis/core/core/promiseUtils.js";
import "./runtime.js";
import "@arcgis/toolkit/dom";
import { g as T, d as c, f as u, h as y, j as g } from "./type-guards.js";
var A = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, v = (t, i, s, p) => {
  for (var e = _(i, s), r = t.length - 1, o; r >= 0; r--)
    (o = t[r]) && (e = o(i, s, e) || e);
  return e && A(i, s, e), e;
};
function ei(t) {
  return t !== void 0 && "xAxisTitleText" in t;
}
class b extends l {
  /**
   * The x-axis title text.
   */
  get xAxisTitleText() {
    return x(0, this._config);
  }
  set xAxisTitleText(i) {
    m(i, 0, this._config);
  }
}
v([
  a
], b.prototype, "xAxisTitleText");
var P = Object.defineProperty, C = Object.getOwnPropertyDescriptor, M = (t, i, s, p) => {
  for (var e = C(i, s), r = t.length - 1, o; r >= 0; r--)
    (o = t[r]) && (e = o(i, s, e) || e);
  return e && P(i, s, e), e;
};
function si(t) {
  return t !== void 0 && "xAxisTitleVisibility" in t;
}
class O extends l {
  /**
   * Whether the x-axis title is visible.
   * `true`: X-axis title is visible.
   * `false`: X-axis title is hidden.
   */
  get xAxisTitleVisibility() {
    return f(0, this._config);
  }
  set xAxisTitleVisibility(i) {
    d(i, 0, this._config);
  }
}
M([
  a
], O.prototype, "xAxisTitleVisibility");
function ri(t) {
  return t !== void 0 && "generateXAxisTitle" in t;
}
class oi extends l {
  /**
   * Generate the proper x-axis title from the current config.
   */
  generateXAxisTitle() {
    const i = this.layerInfo?.layerFieldsInfo;
    if (i === void 0)
      return "";
    if (T(this) || c(this))
      return n(i, this.xAxisField);
    if (u(this))
      return this.category !== h ? n(i, this.category) : "";
    if (y(this))
      return n(i, this.numericField);
    if (g(this)) {
      const s = this.xTemporalBinning?.unit;
      return s !== void 0 ? this.commonStrings.utilsStrings.heatChartCalendarDatePartsUnits[s] : "";
    }
    return "";
  }
}
export {
  b as W,
  O as a,
  oi as b,
  ri as c,
  si as d,
  ei as i
};
