import React from 'react';
import { useToolbarCollectionContext } from '../ToolbarCollectionContext';
import { MultiLevelSortingPanel } from './MultiLevelSortingPanel';
import { minimalRequiredWdsRuntimeCheck } from '../../minimalRequiredWdsRuntimeCheck';

export function MultiLevelSortingPanelEntry() {
  const state = useToolbarCollectionContext();

  if (process.env.NODE_ENV !== 'production') {
    minimalRequiredWdsRuntimeCheck({
      required: '^1.68.0',
      requiredBy: 'WixPatterns/MultiLevelSorting',
    });
  }

  return <MultiLevelSortingPanel state={state} />;
}
