import { FiltersMap } from '@wix/bex-core';
import { useSelector } from '../../useSelector';
import { DragAndDropState } from '../DragAndDrop';

export const createUseIsDropDisabled = <T, F extends FiltersMap>(
  state: DragAndDropState<T, F>,
) => {
  return () => {
    const isActiveRectOutsideContainer = useSelector(
      () => state.isActiveRectOutsideContainer,
    );

    return isActiveRectOutsideContainer;
  };
};
