import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';

const EclLanguageItem$1 = /*@__PURE__*/ proxyCustomElement(class EclLanguageItem extends HTMLElement {
    constructor() {
        super();
        this.__registerHost();
        this.theme = 'ec';
        this.styleClass = undefined;
        this.path = undefined;
        this.langCode = undefined;
        this.language = undefined;
        this.active = false;
    }
    getClass() {
        const styleClasses = [
            `ecl-site-header__language-item`,
            `sc-ecl-site-header-${this.theme}`,
            this.styleClass
        ];
        return styleClasses.join(' ');
    }
    render() {
        return (h("li", { class: this.getClass() }, h("a", { href: this.path, class: `ecl-link ecl-link--standalone ecl-site-header__language-link sc-ecl-site-header-${this.theme} ${this.active ? 'ecl-site-header__language-link--active' : ''}` }, h("span", { class: `ecl-site-header__language-link-code sc-ecl-site-header-${this.theme}` }, this.langCode), h("span", { class: `ecl-site-header__language-link-label sc-ecl-site-header-${this.theme}` }, this.language))));
    }
    get el() { return this; }
}, [0, "ecl-language-item", {
        "theme": [1],
        "styleClass": [1, "style-class"],
        "path": [1],
        "langCode": [1, "lang-code"],
        "language": [1],
        "active": [4]
    }]);
function defineCustomElement$1() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["ecl-language-item"];
    components.forEach(tagName => { switch (tagName) {
        case "ecl-language-item":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, EclLanguageItem$1);
            }
            break;
    } });
}

const EclLanguageItem = EclLanguageItem$1;
const defineCustomElement = defineCustomElement$1;

export { EclLanguageItem, defineCustomElement };

//# sourceMappingURL=ecl-language-item.js.map