/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import { c as t } from "../../chunks/runtime.js";
import { css as o, html as n } from "lit";
import { u as e } from "../../chunks/useT9n.js";
import { LitElement as d } from "@arcgis/lumina";
const u = o`:host{display:flex;flex-direction:column;width:var(--arcgis-charts-config-calcite-block-default-width)}`;
class l extends d {
  constructor() {
    super(...arguments), this._messages = e(), this.open = !1;
  }
  static {
    this.properties = { messageOverrides: 0, model: 0, calculatedDataMinMaxBounds: 0, open: 5, showMinXBoundOption: 5, showMaxXBoundOption: 5, showMinYBoundOption: 5, showMaxYBoundOption: 5, showEnableXLogOption: 5, showEnableYLogOption: 5, calculatedMinMaxBounds: 0 };
  }
  static {
    this.styles = u;
  }
  getMinFromCalculatedDataBounds(i) {
    return this.calculatedDataMinMaxBounds?.find((a) => a.isXAxis === i)?.minimum ?? Number.NaN;
  }
  getMaxFromCalculatedDataBounds(i) {
    return this.calculatedDataMinMaxBounds?.find((a) => a.isXAxis === i)?.maximum ?? Number.NaN;
  }
  render() {
    const i = this.calculatedMinMaxBounds?.find((a) => a.isXAxis), s = this.calculatedMinMaxBounds?.find((a) => !a.isXAxis);
    return n`<arcgis-charts-config-axis .model=${this.model} is-x-axis .axisTitle=${this._messages.xAxis} .showMinBoundOption=${this.showMinXBoundOption} .showMaxBoundOption=${this.showMaxXBoundOption} .showEnableLogOption=${this.showEnableXLogOption} .dataMinValue=${this.getMinFromCalculatedDataBounds(!0)} .dataMaxValue=${this.getMaxFromCalculatedDataBounds(!0)} .initialMaxBound=${i?.maximum} .initialMinBound=${i?.minimum}></arcgis-charts-config-axis><arcgis-charts-config-axis .model=${this.model} .axisTitle=${this._messages.yAxis} .showMinBoundOption=${this.showMinYBoundOption} .showMaxBoundOption=${this.showMaxYBoundOption} .showEnableLogOption=${this.showEnableYLogOption} .dataMinValue=${this.getMinFromCalculatedDataBounds(!1)} .dataMaxValue=${this.getMaxFromCalculatedDataBounds(!1)} .initialMaxBound=${s?.maximum} .initialMinBound=${s?.minimum}></arcgis-charts-config-axis>`;
  }
}
t("arcgis-charts-config-axes", l);
export {
  l as ArcgisChartsConfigAxes
};
