import { __extends } from "tslib";
import { Component } from 'react';
var BasePageJumper = (function (_super) {
    __extends(BasePageJumper, _super);
    function BasePageJumper(props) {
        var _a;
        var _this = _super.call(this, props) || this;
        _this.onChange = function (value) {
            _this.setState({
                value: value,
            });
        };
        _this.onConfirm = function (e) {
            e.preventDefault();
            var pageNumber = +e.target.value;
            _this.handleJump(pageNumber);
        };
        _this.state = {
            value: (_a = props.current) !== null && _a !== void 0 ? _a : null,
        };
        return _this;
    }
    return BasePageJumper;
}(Component));
export { BasePageJumper };
export default BasePageJumper;
