/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import { c as d } from "../../chunks/runtime.js";
import { css as m, html as r } from "lit";
import { LitElement as p, safeClassMap as a, safeStyleMap as e } from "@arcgis/lumina";
import { H as i } from "../../chunks/resources.js";
import "@arcgis/toolkit/intl";
import "lodash-es";
import "luxon";
import "d3-array";
import "@arcgis/toolkit/type";
import "../../chunks/series-types.js";
import { aF as c, aE as h, aG as g, dm as f, aI as u, aH as b, dd as x } from "../../chunks/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 "@arcgis/toolkit/dom";
const y = m`.hide{visibility:hidden}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}:host{display:block;width:auto;height:auto;overflow:auto}.panel-children-container{display:flex;padding:0 1rem;margin-top:1rem}.panel-children-container calcite-label{flex:1 1 0px;display:flex;width:0px}.info-modal-container{box-sizing:border-box;width:-webkit-fill-available;height:100%;display:grid;position:absolute;place-items:center;align-content:center;justify-content:center;padding:1rem;text-align:start}.info-modal-container h3.heading-true{margin-bottom:auto;background:#0000000d;height:30px;padding-left:.5rem;padding-top:.5rem;justify-self:stretch;text-align:start}.info-modal-container h3.heading-false{background:#0000000d;margin-bottom:auto;text-align:start}.info-modal-container p{justify-self:stretch;text-align:start}.chart-loader-overlay{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;z-index:1001}`;
class C extends p {
  constructor() {
    super(...arguments), this.message = "", this.heading = "", this.showErrorModalInfo = !1, this.showLoader = !1, this.enableAutoTheming = !1;
  }
  static {
    this.properties = { message: 1, heading: 1, showErrorModalInfo: 5, showLoader: 5, loaderColors: 0, calciteThemeApplied: 1, enableAutoTheming: 5 };
  }
  static {
    this.styles = y;
  }
  render() {
    let o = null;
    const n = this.calciteThemeApplied === "dark" && this.enableAutoTheming, t = this.loaderColors?.curtainColor ?? (n ? c : h), l = this.loaderColors?.spinnerColor ?? g, s = f({
      r: t[0],
      g: t[1],
      b: t[2],
      a: t[3] / 255
    }) ? u : b;
    return this.showErrorModalInfo ? o = r`<div class=${a(i.InfoModalContainer)} style=${e({ background: `rgb(${t.toString()})` })}><h3 class=${a(this.heading !== "" ? "heading-true" : "heading-false")} style=${e({ color: `rgb(${s.toString()})` })}>${this.heading}</h3><p style=${e({ color: `rgb(${s.toString()})` })} .innerHTML=${x(this.message) ?? ""}></p></div>` : this.showLoader ? o = r`<div class=${a(i.ChartLoaderOverlay)} style=${e({
      background: `rgb(${t.toString()})`,
      "--calcite-loader-progress-color": `rgb(${l.toString()})`
    })}><calcite-loader scale=s label=Loading></calcite-loader></div>` : o = r`<div class=${`${i.InfoModalContainer} ${i.Hide}`}></div>`, o;
  }
}
d("arcgis-charts-info-modal", C);
export {
  C as ArcgisChartsInfoModal
};
