import { c as t } from "../../chunks/runtime.js";
import { css as c, html as l } from "lit";
import { LitElement as m, safeClassMap as i } from "@arcgis/lumina";
import { classes as n } from "@arcgis/toolkit/dom";
import { a as g, s as o, g as d } from "../../chunks/utils2.js";
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
v4.34.7 */
const p = c`.arcgis-legend__size-ramp--container{margin-left:var(--calcite-spacing-sm);display:table}:dir(rtl) .arcgis-legend__size-ramp--container{margin-right:var(--calcite-spacing-sm);margin-left:0;overflow:auto}.arcgis-legend__size-ramp--row{display:table-row}.arcgis-legend__size-ramp--cell{padding:var(--calcite-spacing-xxs) 0;min-width:100px;vertical-align:middle;word-break:break-word;display:table-cell}.arcgis-legend__size-ramp--label{padding-right:var(--calcite-spacing-sm);padding-left:var(--calcite-spacing-sm);max-width:250px;word-break:normal;word-wrap:normal;font-size:var(--calcite-font-size-sm)}.arcgis-legend__size-ramp--symbol-container{min-width:10px;text-align:center}.arcgis-legend__size-ramp--symbol{display:flex;justify-content:center}`, e = {
  container: "arcgis-legend__size-ramp--container",
  row: "arcgis-legend__size-ramp--row",
  cell: "arcgis-legend__size-ramp--cell",
  label: "arcgis-legend__size-ramp--label",
  symbol: "arcgis-legend__size-ramp--symbol",
  symbolContainer: "arcgis-legend__size-ramp--symbol-container"
};
class _ extends m {
  constructor() {
    super(...arguments), this.legendElement = null;
  }
  static {
    this.properties = { legendElement: 0, messages: 0 };
  }
  static {
    this.styles = p;
  }
  render() {
    const s = this.legendElement.infos.map((a) => this._renderRow(a)).filter(Boolean);
    return s.length ? this.legendElement.theme === "spike" ? l`<arcgis-legend-spike-ramp .legendElement=${this.legendElement} .messages=${this.messages}></arcgis-legend-spike-ramp>` : l`<div class=${i(e.container)}>${s}</div>` : null;
  }
  _renderRow(s) {
    const { preview: a } = s;
    if (!a)
      return null;
    const r = g(this.messages, s.label, !1);
    return o(a, d(this.messages, r)), l`<div class=${i(e.row)}><div class=${i(n(e.cell, e.symbolContainer))}><div class=${i(e.symbol)}>${a}</div></div><div class=${i(n(e.cell, e.label))}>${r}</div></div>`;
  }
}
t("arcgis-legend-classic-size-ramp", _);
export {
  _ as ArcgisLegendClassicSizeRamp
};
