import { h } from "@stencil/core";
export class EclPagination {
    constructor() {
        this.styleClass = '';
    }
    getClass() {
        const styleClasses = [
            `ecl-pagination`,
            this.styleClass
        ];
        return styleClasses.join(' ');
    }
    componentWillLoad() {
        var _a;
        this.theme = (_a = document.documentElement.getAttribute('data-ecl-theme')) !== null && _a !== void 0 ? _a : (this.theme || 'ec');
    }
    componentDidRender() {
        const items = this.el.querySelectorAll('.ecl-pagination__item');
        if (items) {
            this.el.querySelector('.ecl-pagination__list').innerHTML = '';
            this.el.querySelector('.ecl-pagination__list').append(...items);
        }
    }
    ;
    render() {
        return (h("div", { key: '1cb1eaa4709d1ca1de4f5cbe1e61105fd9e46312', class: this.getClass() }, h("ul", { key: 'fd9283d7c619285a37a0345b59c58c37de28f598', class: "ecl-pagination__list" }, h("slot", { key: 'de4fccb7b00922c14abf5e33ee83427ce0b869c4' }))));
    }
    ;
    static get is() { return "ecl-pagination"; }
    static get encapsulation() { return "scoped"; }
    static get originalStyleUrls() {
        return {
            "ec": ["./build/styles/ecl-pagination-ec.css"],
            "eu": ["./build/styles/ecl-pagination-eu.css"]
        };
    }
    static get styleUrls() {
        return {
            "ec": ["build/styles/ecl-pagination-ec.css"],
            "eu": ["build/styles/ecl-pagination-eu.css"]
        };
    }
    static get properties() {
        return {
            "styleClass": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "style-class",
                "defaultValue": "''"
            },
            "theme": {
                "type": "string",
                "mutable": true,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "theme"
            }
        };
    }
    static get elementRef() { return "el"; }
}
