import { h } from '@stencil/core';
export class DatatablePagination {
    constructor() {
        this.size = 0;
        this.total = 0;
        this.currentPage = 0;
        this.first = 0;
        this.last = 0;
    }
    handleNextClick() {
        this.nextPage.emit();
    }
    handlePreviousClick() {
        this.previousPage.emit();
    }
    render() {
        return (h("div", { class: "container" },
            h("materials-layout-grid", { class: "pagination" },
                h("materials-layout-cell", { class: "navigate" },
                    h("materials-icon-button", { icon: "navigate_before", onClick: () => this.handlePreviousClick() })),
                h("materials-layout-cell", { class: "pages" },
                    h("span", null,
                        " ",
                        this.first,
                        " - ",
                        this.last,
                        " sur ",
                        this.total)),
                h("materials-layout-cell", { class: "navigate" },
                    h("materials-icon-button", { icon: "navigate_next", onClick: () => this.handleNextClick() })))));
    }
    static get is() { return "materials-datatable-pagination"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() { return {
        "$": ["datatable-pagination.scss"]
    }; }
    static get styleUrls() { return {
        "$": ["datatable-pagination.css"]
    }; }
    static get properties() { return {
        "size": {
            "type": "number",
            "mutable": false,
            "complexType": {
                "original": "number",
                "resolved": "number",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "size",
            "reflect": false,
            "defaultValue": "0"
        },
        "total": {
            "type": "number",
            "mutable": false,
            "complexType": {
                "original": "number",
                "resolved": "number",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "total",
            "reflect": false,
            "defaultValue": "0"
        },
        "currentPage": {
            "type": "number",
            "mutable": false,
            "complexType": {
                "original": "number",
                "resolved": "number",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "current-page",
            "reflect": false,
            "defaultValue": "0"
        },
        "first": {
            "type": "number",
            "mutable": false,
            "complexType": {
                "original": "number",
                "resolved": "number",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "first",
            "reflect": false,
            "defaultValue": "0"
        },
        "last": {
            "type": "number",
            "mutable": false,
            "complexType": {
                "original": "number",
                "resolved": "number",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "last",
            "reflect": false,
            "defaultValue": "0"
        }
    }; }
    static get events() { return [{
            "method": "nextPage",
            "name": "nextPage",
            "bubbles": true,
            "cancelable": true,
            "composed": true,
            "docs": {
                "tags": [],
                "text": ""
            },
            "complexType": {
                "original": "any",
                "resolved": "any",
                "references": {}
            }
        }, {
            "method": "previousPage",
            "name": "previousPage",
            "bubbles": true,
            "cancelable": true,
            "composed": true,
            "docs": {
                "tags": [],
                "text": ""
            },
            "complexType": {
                "original": "any",
                "resolved": "any",
                "references": {}
            }
        }]; }
}
