"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var webmapgl_core_js_1 = require("../webmapgl.core.js");
var chunk_cf921ba9_js_1 = require("./chunk-cf921ba9.js");
var chunk_c82b670d_js_1 = require("./chunk-c82b670d.js");
var AttributeValues = function () { function t() { this.options = [], this.header = chunk_cf921ba9_js_1.a("webmapgl.attribute-values.header"), this.limit = 1, this.valueMaxWidth = "200px"; } return t.prototype.componentWillLoad = function () { this.parseAttributeOptions(); }, t.prototype.parseAttributeOptions = function () { this.options = "string" == typeof this.attributeOptions ? JSON.parse(this.attributeOptions) : this.attributeOptions; }, t.prototype.getItemsForFeature = function (t, e) { var r = this; return e.filter(function (e) { return e.name != r.headerAttribute && void 0 !== t.properties[e.name]; }).map(function (e) { return webmapgl_core_js_1.h("ion-item", null, webmapgl_core_js_1.h("ion-label", { position: r.labelPosition }, e.alias || e.name), webmapgl_core_js_1.h("ion-note", { slot: "stacked" != r.labelPosition ? "end" : null, "text-wrap": !0, style: { "max-width": r.valueMaxWidth } }, t.properties[e.name])); }); }, t.prototype.generateOptions = function (t) { var e = []; for (var r in t.properties)
    e.push({ name: r }); return e; }, t.prototype.render = function () { if (!this.features || !this.features.length)
    return null; for (var t = [], e = 0, r = this.features.slice(0, this.limit); e < r.length; e++) {
    var i = r[e];
    t.push(webmapgl_core_js_1.h("ion-item-divider", null, webmapgl_core_js_1.h("ion-label", null, this.headerAttribute ? i.properties[this.headerAttribute] : this.header)));
    var n = this.options || this.generateOptions(i);
    Array.prototype.push.apply(t, this.getItemsForFeature(i, n));
} return webmapgl_core_js_1.h("ion-list", null, t); }, Object.defineProperty(t, "is", { get: function () { return "gl-attribute-values"; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t, "properties", { get: function () { return { attributeOptions: { type: String, attr: "attribute-options", watchCallbacks: ["parseAttributeOptions"] }, el: { elementRef: !0 }, features: { type: "Any", attr: "features" }, header: { type: String, attr: "header" }, headerAttribute: { type: String, attr: "header-attribute" }, labelPosition: { type: String, attr: "label-position" }, limit: { type: Number, attr: "limit" }, valueMaxWidth: { type: String, attr: "value-max-width" } }; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t, "style", { get: function () { return "gl-attribute-values ion-note{font-size:14px;line-height:14px;padding-top:16px;text-align:right}"; }, enumerable: !0, configurable: !0 }), t; }(), Note = function () { function t() { } return t.prototype.hostData = function () { var t; return { class: Object.assign({}, chunk_c82b670d_js_1.a(this.color), (t = {}, t["" + this.mode] = !0, t)) }; }, t.prototype.render = function () { return webmapgl_core_js_1.h("slot", null); }, Object.defineProperty(t, "is", { get: function () { return "ion-note"; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t, "encapsulation", { get: function () { return "shadow"; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t, "properties", { get: function () { return { color: { type: String, attr: "color" }, mode: { type: String, attr: "mode" } }; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t, "style", { get: function () { return ":host{color:var(--color);font-family:var(--ion-font-family,inherit);-webkit-box-sizing:border-box;box-sizing:border-box}:host(.ion-color){color:var(--ion-color-base)}:host{--color:var(--ion-color-step-600,#666);font-size:14px}"; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t, "styleMode", { get: function () { return "md"; }, enumerable: !0, configurable: !0 }), t; }();
exports.GlAttributeValues = AttributeValues;
exports.IonNote = Note;
