import { __assign, __extends } from "tslib";
import { jsx as _jsx } from "react/jsx-runtime";
import ArrowButton from '../button/ArrowButton';
import MiniPageJumper from '../jumper/MiniPageJumper';
import BasePageList from './BasePageList';
var MiniPageList = (function (_super) {
    __extends(MiniPageList, _super);
    function MiniPageList() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.onPrevPage = _this.jumpToPageDelta(-1);
        _this.onNextPage = _this.jumpToPageDelta(1);
        return _this;
    }
    MiniPageList.prototype.resetActiveDoubleArrowButton = function () { };
    MiniPageList.prototype.render = function () {
        var _this = this;
        var _a = this.props, layout = _a.layout, buttonBordered = _a.buttonBordered, current = _a.current, onPageChange = _a.onPageChange, lastPageHelp = _a.lastPageHelp;
        return (_jsx("div", __assign({ className: "zent-pagination-page-list--mini", "data-zv": 'v10.0.12' }, { children: layout.map(function (btn) {
                var type = btn.type;
                if (type === 'left-arrow') {
                    return (_jsx(ArrowButton, { direction: "left", disabled: btn.disabled, bordered: buttonBordered, onClick: _this.onPrevPage }, type));
                }
                if (type === 'right-arrow') {
                    return (_jsx(ArrowButton, { direction: "right", disabled: btn.disabled, bordered: buttonBordered, onClick: _this.onNextPage, disabledHelp: lastPageHelp }, type));
                }
                if (type === 'mini-jumper') {
                    return (_jsx(MiniPageJumper, { current: current, totalPages: btn.totalPages, onJump: onPageChange }, type));
                }
                return null;
            }) }), void 0));
    };
    return MiniPageList;
}(BasePageList));
export default MiniPageList;
