import { useContext } from 'react';
import { TableContext } from '../context.js';

const useDataTable = () => {
    const ctx = useContext(TableContext);
    if (ctx === null) {
        throw new Error('useDataTable must be used inside of a DataTable.Provider');
    }
    return ctx;
};

export { useDataTable };
//# sourceMappingURL=useDataTable.js.map
