"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExampleResultPaginationNumbered = void 0;
const react_1 = __importDefault(require("react"));
const ExampleResultPaginationNumbered = (props) => {
    return (react_1.default.createElement("nav", { className: "rs__pagination__nav" },
        props.currentPage > 0 && (react_1.default.createElement("a", { className: "rs__pagination__prev-link", rel: "prev", href: props.buildPagePath(props.currentPage), onClick: (event) => props.handlePreviousPage(event) }, "Prev")),
        !props.pagesToShow.includes(0) && (react_1.default.createElement("a", { className: "rs__pagination__pagenumber-link", href: props.buildPagePath(1), onClick: (event) => props.handlePageChange(0, event), rel: 0 === props.currentPage - 1 ? `prev` : undefined }, "1")),
        !props.pagesToShow.includes(1) && react_1.default.createElement("span", null, "..."),
        props.pagesToShow.map((page) => page === props.currentPage ? (react_1.default.createElement("span", { className: "rs__pagination__pagenumber-active", key: page + 1 }, page + 1)) : (react_1.default.createElement("a", { className: "rs__pagination__pagenumber-link", key: page + 1, href: props.buildPagePath(page + 1), onClick: (event) => props.handlePageChange(page, event), rel: page === props.currentPage + 1
                ? `next`
                : page === props.currentPage - 1
                    ? `prev`
                    : undefined }, page + 1))),
        !props.pagesToShow.includes(props.totalPages - 2) && react_1.default.createElement("span", null, "..."),
        !props.pagesToShow.includes(props.totalPages - 1) && (react_1.default.createElement("a", { className: "rs__pagination__pagenumber-link", href: props.buildPagePath(props.totalPages), onClick: (event) => props.handlePageChange(props.totalPages - 1, event), rel: props.totalPages - 1 === props.currentPage + 1
                ? `next`
                : props.totalPages - 1 === props.currentPage - 1
                    ? `prev`
                    : undefined }, props.totalPages)),
        props.currentPage + 1 < props.totalPages && (react_1.default.createElement("a", { className: "rs__pagination__next-link", rel: "next", href: props.buildPagePath(props.currentPage + 2), onClick: (event) => props.handleNextPage(event) }, "Next"))));
};
exports.ExampleResultPaginationNumbered = ExampleResultPaginationNumbered;
//# sourceMappingURL=ExampleResultPaginationNumbered.js.map