import { a } from "./chunk-RMX2AZ4P.js"; import { d, e, n2 as n, y3 as y } from "./chunk-Y3WMVFTW.js"; // node_modules/@arcgis/core/layers/support/ExportWMSImageParameters.js var a2 = { visible: "visibleSublayers" }; var l = class extends a(y) { constructor(e2) { super(e2), this.scale = 0; } set layer(e2) { this._get("layer") !== e2 && (this._set("layer", e2), this.handles.remove("layer"), e2 && this.handles.add([e2.sublayers.on("change", () => this.notifyChange("visibleSublayers")), e2.on("wms-sublayer-update", (e3) => this.notifyChange(a2[e3.propertyName]))], "layer")); } get layers() { const { visibleSublayers: e2 } = this; return e2.filter((e3) => e3.name).map((e3) => e3.name).join(","); } get version() { this.commitProperty("layers"); const e2 = this.layer; return e2 && e2.commitProperty("imageTransparency"), (this._get("version") || 0) + 1; } get visibleSublayers() { const { layer: e2, scale: r } = this, s = e2?.sublayers, t = [], o = (e3) => { const { minScale: s2, maxScale: a3, sublayers: l2, visible: i } = e3; i && (r === 0 || (s2 === 0 || r <= s2) && (a3 === 0 || r >= a3)) && (l2 ? l2.forEach(o) : t.unshift(e3)); }; return s?.forEach(o), t; } toJSON() { const { layer: e2, layers: r } = this, { imageFormat: s, imageTransparency: t, version: o } = e2; return { format: s, request: "GetMap", service: "WMS", styles: "", transparent: t ? "TRUE" : "FALSE", version: o, layers: r }; } }; e([d()], l.prototype, "layer", null), e([d({ readOnly: true })], l.prototype, "layers", null), e([d({ type: Number })], l.prototype, "scale", void 0), e([d({ readOnly: true })], l.prototype, "version", null), e([d({ readOnly: true })], l.prototype, "visibleSublayers", null), l = e([n("esri.layers.support.ExportWMSImageParameters")], l); export { l }; //# sourceMappingURL=chunk-OQZ4CVQB.js.map