import { jsx as _jsx } from "react/jsx-runtime";
import { DataGridPaginationContainer } from '../DataGridPaginationContainer';
import { Pagination } from '../Pagination';
import { useLogic } from './useLogic';
export const DataGridPagination = (props) => {
    const { isVisiblePagination, pageCount, formattedRange, actualTotalCount } = useLogic(props);
    const { page, totalCount, className, rowsPerPage, rowsPerPageOptions, isForceCounter, disabled, onSetCountPerPage, ...restProps } = props;
    if ((!isVisiblePagination && !isForceCounter) || !actualTotalCount) {
        return null;
    }
    return (_jsx(DataGridPaginationContainer, { rowsPerPage: rowsPerPage, rowsPerPageOptions: rowsPerPageOptions, isDisabled: disabled, formattedRange: formattedRange, className: className, onSetCountPerPage: onSetCountPerPage, pagination: isVisiblePagination && (_jsx(Pagination, { disabled: disabled, count: pageCount, page: page, ...restProps })) }));
};
