import { h } from "@stencil/core";
export class EclPopoverItem {
    constructor() {
        this.theme = 'ec';
        this.styleClass = undefined;
        this.path = undefined;
        this.icon = undefined;
        this.iconSprite = '';
        this.iconSize = 'fluid';
    }
    getClass() {
        const styleClasses = [
            `ecl-popover__item`,
            this.styleClass,
            `sc-ecl-popover-${this.theme}`,
        ];
        return styleClasses.join(' ');
    }
    getLinkClass() {
        const linkClasses = [
            'ecl-popover__link',
            `sc-ecl-popover-${this.theme}`,
        ];
        if (this.icon) {
            linkClasses.push('ecl-link--icon');
        }
        return linkClasses.join(' ');
    }
    render() {
        return (h("li", { class: this.getClass() }, h("ecl-link", { "style-class": `sc-ecl-popover-${this.theme} ecl-popover__link`, variant: "standalone", path: this.path }, this.icon ?
            h("ecl-icon", { "style-class": `sc-ecl-popover-${this.theme} ecl-link__icon`, icon: this.icon, slot: "icon-before", sprite: this.iconSprite || '', size: this.iconSize }) : '', h("slot", null))));
    }
    static get is() { return "ecl-popover-item"; }
    static get properties() {
        return {
            "theme": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "theme",
                "reflect": false,
                "defaultValue": "'ec'"
            },
            "styleClass": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "style-class",
                "reflect": false
            },
            "path": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "path",
                "reflect": false
            },
            "icon": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "icon",
                "reflect": false
            },
            "iconSprite": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "icon-sprite",
                "reflect": false,
                "defaultValue": "''"
            },
            "iconSize": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "icon-size",
                "reflect": false,
                "defaultValue": "'fluid'"
            }
        };
    }
}
//# sourceMappingURL=ecl-popover-item.js.map
