'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const core = require('./core-1276587e.js');

var graphEmpty = "The graph is currently empty";
const i18n = {
	graphEmpty: graphEmpty
};

const AlNodeList = class {
    constructor(hostRef) {
        core.registerInstance(this, hostRef);
        this._contentStrings = i18n;
        this.nodes = null;
        this.selected = null;
        this.selectedChanged = core.createEvent(this, "selectedChanged", 7);
    }
    render() {
        if (this.nodes && this.nodes.size) {
            return (core.h("ion-list", null, Array.from(this.nodes).map(([nodeId, node]) => {
                return (core.h("ion-item", { "data-selected": this.selected === nodeId ? true : false, onClick: () => this.selectedChanged.emit(nodeId) }, node.title));
            })));
        }
        return (core.h("ion-item", null, core.h("p", null, this._contentStrings.graphEmpty)));
    }
    static get style() { return "ion-item {\n  --color: var(--al-item-color);\n  --border-color: var(--al-item-border-color);\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\nion-item[data-selected] {\n  --color: var(--al-item-selected-color);\n}"; }
};

exports.al_node_list = AlNodeList;
