import { c as l } from "../../chunks/runtime.js";
import { LitElement as m } from "@arcgis/lumina";
import { css as p, html as c } from "lit";
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
v5.0.0-next.123 */
const n = p`:host{display:block;block-size:30px;inline-size:100%}:host([layout="vertical"]){writing-mode:vertical-lr}arcgis-ramp-color{block-size:inherit;inline-size:inherit}`;
class h extends m {
  constructor() {
    super(...arguments), this._rampStops = [], this.layout = "horizontal", this.min = 0, this.max = 1, this.stops = [];
  }
  static {
    this.properties = { layout: 1, min: 9, max: 9, stops: 0 };
  }
  static {
    this.styles = n;
  }
  willUpdate(s) {
    if (super.willUpdate(s), s.has("stops")) {
      const { stops: o } = this, t = [];
      o.forEach((r) => {
        const { color: i, max: a, min: e } = r;
        t.push({
          value: e,
          color: i
        }, {
          value: a,
          color: i
        });
      }), this._rampStops = t;
    }
  }
  render() {
    return c`<arcgis-ramp-color .layout=${this.layout} .min=${this.min} .max=${this.max} .stops=${this._rampStops}></arcgis-ramp-color>`;
  }
}
l("arcgis-ramp-color-break", h);
export {
  h as ArcgisRampColorBreak
};
