import React, { useState } from 'react';
import { observer } from 'mobx-react-lite';
import { TableV2 } from '../..';
import { TableState } from '../../state';
import { useWixPatternsContainer } from '@wix/bex-core/react';
function _TableCompat(props) {
    const container = useWixPatternsContainer();
    const [state] = useState(() => props.state instanceof TableState
        ? props.state
        : new TableState({
            collection: props.state,
            container,
        }));
    return React.createElement(TableV2, { ...props, state: state });
}
export const TableCompat = observer(_TableCompat);
//# sourceMappingURL=TableCompat.js.map