import { h, Host } from "@stencil/core";
import { ExtendedPagingDefaults } from "../../api/Pagination";
import { paginationButton, paginationButtonDisabled, paginationButtonIconNext, paginationButtonIconPrevious, paginationButtonText } from "../../styles/parts";
export class PaginationMenu {
    constructor() {
        this.paging = ExtendedPagingDefaults;
        this.params = {};
    }
    render() {
        return (h(Host, { key: '7b821154b627026ef8624af6e4759e2176004676' }, h("nav", { key: '7990aee285d0cc3e6f83cb59bb216439e5364df5', "aria-label": "Table pagination", class: "d-flex justify-content-end gap-3" }, h("ul", { key: '02c68163934ce1aabf4abd607cc28e549e20ebe1', class: "pagination m-0" }, h("li", { key: 'aab661ae85fc61eecd230d058f135483796769c0', class: `page-item ${this.paging.has_previous ? '' : ' disabled'}` }, h("button", { key: 'ef42a41831a9890186c333418b161877761674e1', class: "page-link", onClick: (e) => {
                e.preventDefault();
                this.paging.handleClickPrevious(this.paging.start_cursor);
            }, part: this.paging.has_previous ? paginationButton : paginationButtonDisabled }, h("span", { key: 'a898a92687e4a5fec37d9dab4208430260a9f274', class: "me-1", part: paginationButtonIconPrevious }, "\u00AB"), h("span", { key: 'ecc2eeedc064d405ad178b9a98ed088e12f1b2fb', part: paginationButtonText }, "Previous"))), h("li", { key: '56569cd9f9803ead8b1180e2f982a98d7009be1f', class: `page-item ${this.paging.has_next ? '' : ' disabled'}` }, h("button", { key: 'c39d389ab89609e8ce11b3dd81eb5c4a50d3521f', class: "page-link", onClick: (e) => {
                e.preventDefault();
                this.paging.handleClickNext(this.paging.end_cursor);
            }, part: this.paging.has_next ? paginationButton : paginationButtonDisabled }, h("span", { key: '6a01458a048a524931b03df6a964fa4a0ac403ac', part: paginationButtonText }, "Next"), h("span", { key: 'f4cb3d084647c00dff30b99f751180564463443f', class: "ms-1", part: paginationButtonIconNext }, "\u00BB")))))));
    }
    static get is() { return "pagination-menu"; }
    static get properties() {
        return {
            "paging": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "PaginationProps['paging']",
                    "resolved": "ExtendedPagingInfo",
                    "references": {
                        "PaginationProps": {
                            "location": "local",
                            "path": "/home/runner/work/web-component-library/web-component-library/packages/webcomponents/src/ui-components/pagination-menu/pagination-menu.tsx",
                            "id": "src/ui-components/pagination-menu/pagination-menu.tsx::PaginationProps"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "defaultValue": "ExtendedPagingDefaults"
            },
            "params": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "PaginationProps['params']",
                    "resolved": "{}",
                    "references": {
                        "PaginationProps": {
                            "location": "local",
                            "path": "/home/runner/work/web-component-library/web-component-library/packages/webcomponents/src/ui-components/pagination-menu/pagination-menu.tsx",
                            "id": "src/ui-components/pagination-menu/pagination-menu.tsx::PaginationProps"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "defaultValue": "{}"
            }
        };
    }
}
