import React, { useEffect, useState } from 'react';
import { observer } from 'mobx-react-lite';
import { CollectionPagination } from '../CollectionPagination';
import { CollectionTable } from '../CollectionTable';
import { TableState } from '../../state';
import { useWixPatternsContainer } from '@wix/bex-core/react';
export function _PaginationTable(props) {
    const { state: collection, cardProps, ...rest } = props;
    const container = useWixPatternsContainer();
    const [state] = useState(() => new TableState({
        collection,
        container,
    }));
    useEffect(() => state.init({
        featuresInitializers: [],
    }), []);
    return (React.createElement(React.Fragment, null,
        React.createElement(CollectionTable, { state: state, cardProps: { stretchVertically: true, ...cardProps }, ...rest }),
        React.createElement(CollectionPagination, { state: state.collection })));
}
export const PaginationTable = observer(_PaginationTable);
//# sourceMappingURL=PaginationTable.js.map