"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const components_1 = require("@bluebase/components");
const TablePagination_1 = tslib_1.__importDefault(require("@material-ui/core/TablePagination"));
const react_1 = tslib_1.__importDefault(require("react"));
exports.TablePagination = (props) => {
    const { count, onPageChange, page, rowsPerPage, onChangeRowsPerPage, rowsPerPageOptions, style } = props, rest = tslib_1.__rest(props, ["count", "onPageChange", "page", "rowsPerPage", "onChangeRowsPerPage", "rowsPerPageOptions", "style"]);
    const onChangePage = (_event, pageNum) => onPageChange(pageNum);
    const onChangeRowsPerPageCustom = (event) => {
        if (onChangeRowsPerPage) {
            onChangeRowsPerPage(event.target.value);
        }
    };
    return (react_1.default.createElement(TablePagination_1.default, Object.assign({ count: count, onChangePage: onChangePage, page: page, rowsPerPage: rowsPerPage, rowsPerPageOptions: rowsPerPageOptions, onChangeRowsPerPage: onChangeRowsPerPageCustom, style: style }, rest)));
};
exports.TablePagination.defaultProps = components_1.TablePaginationDefaultProps;
