import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
import { d as defineCustomElement$3 } from './ecl-icon2.js';
import { d as defineCustomElement$2 } from './ecl-link2.js';

const EclPaginationItem$1 = /*@__PURE__*/ proxyCustomElement(class EclPaginationItem extends HTMLElement {
    constructor() {
        super();
        this.__registerHost();
        this.styleClass = '';
        this.theme = 'ec';
        this.path = undefined;
        this.ariaLabel = undefined;
        this.current = undefined;
        this.previous = undefined;
        this.next = undefined;
    }
    getClass() {
        const styleClasses = [
            `ecl-pagination__item`,
            `sc-ecl-pagination-${this.theme}`,
            this.styleClass
        ];
        if (this.current) {
            styleClasses.push('ecl-pagination__item--current');
        }
        if (this.previous) {
            styleClasses.push('ecl-pagination__item--previous');
        }
        if (this.next) {
            styleClasses.push('ecl-pagination__item--next');
        }
        return styleClasses.join(' ');
    }
    render() {
        return (h("li", { class: this.getClass() }, !this.current ?
            h("ecl-link", { theme: this.theme, variant: "standalone", path: this.path, "aria-label": this.ariaLabel, styleClass: `sc-ecl-pagination-${this.theme}` }, h("slot", null), this.previous || this.next ?
                h("ecl-icon", { icon: "corner-arrow", size: "xs", theme: this.theme, transform: this.previous ? 'rotate-270' : 'rotate-90', slot: this.previous ? 'icon-before' : 'icon-after', "style-class": `sc-ecl-pagination-${this.theme}` }) : '') : '', this.current ?
            h("span", { class: `ecl-pagination__text ecl-pagination__text--summary sc-ecl-pagination-${this.theme}` }, h("slot", null)) : '', this.current ?
            h("span", { class: `ecl-pagination__text ecl-pagination__text--full sc-ecl-pagination-${this.theme}` }, this.ariaLabel) : ''));
    }
    ;
}, [4, "ecl-pagination-item", {
        "styleClass": [1, "style-class"],
        "theme": [1],
        "path": [1],
        "ariaLabel": [1, "aria-label"],
        "current": [4],
        "previous": [4],
        "next": [4]
    }]);
function defineCustomElement$1() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["ecl-pagination-item", "ecl-icon", "ecl-link"];
    components.forEach(tagName => { switch (tagName) {
        case "ecl-pagination-item":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, EclPaginationItem$1);
            }
            break;
        case "ecl-icon":
            if (!customElements.get(tagName)) {
                defineCustomElement$3();
            }
            break;
        case "ecl-link":
            if (!customElements.get(tagName)) {
                defineCustomElement$2();
            }
            break;
    } });
}

const EclPaginationItem = EclPaginationItem$1;
const defineCustomElement = defineCustomElement$1;

export { EclPaginationItem, defineCustomElement };

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