import { h } from '../edel-elements.core.js';

class EdelItemListItemComponent {
    constructor() {
        this.icon = null;
        this.removeButton = false;
        this.renderLink = false;
    }
    render() {
        return (h("li", { class: "itemlist-item" },
            this.icon ? (h("span", { class: "itemlist-icon" },
                h("edel-icon", { name: this.icon }))) : null,
            this.renderLink
                ? h("a", { class: "itemlist-label", href: "javascript:void(0)", onClick: () => this.itemClick.emit() }, this.label)
                : h("span", { class: "itemlist-label" }, this.label),
            this.removeButton ? (h("edel-button", { plain: true, slim: true, disabled: true, "no-pointer-events": true })) : (h("edel-button", { plain: true, slim: true, icon: "times" }))));
    }
    static get is() { return "edel-itemlist-item"; }
    static get properties() { return {
        "icon": {
            "type": String,
            "attr": "icon"
        },
        "label": {
            "type": String,
            "attr": "label"
        },
        "removeButton": {
            "type": Boolean,
            "attr": "remove-button"
        },
        "renderLink": {
            "type": Boolean,
            "attr": "render-link"
        }
    }; }
    static get events() { return [{
            "name": "itemClick",
            "method": "itemClick",
            "bubbles": true,
            "cancelable": true,
            "composed": true
        }]; }
}

export { EdelItemListItemComponent as EdelItemlistItem };
