import { h } from "@stencil/core";
export class EclPaginationItem {
    constructor() {
        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) : ''));
    }
    ;
    static get is() { return "ecl-pagination-item"; }
    static get properties() {
        return {
            "styleClass": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "style-class",
                "reflect": false,
                "defaultValue": "''"
            },
            "theme": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "theme",
                "reflect": false,
                "defaultValue": "'ec'"
            },
            "path": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "path",
                "reflect": false
            },
            "ariaLabel": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "aria-label",
                "reflect": false
            },
            "current": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "current",
                "reflect": false
            },
            "previous": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "previous",
                "reflect": false
            },
            "next": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "next",
                "reflect": false
            }
        };
    }
}
//# sourceMappingURL=ecl-pagination-item.js.map
