export const areLocationsEqual = (first, second) => {
  // if both are null - we are equal
  if (first == null && second == null) {
    return true;
  }

  // if one is null - then they are not equal
  if (first == null || second == null) {
    return false;
  }

  // compare their actual values
  return first.droppableId === second.droppableId && first.index === second.index;
};
export const isCombineEqual = (first, second) => {
  // if both are null - we are equal
  if (first == null && second == null) {
    return true;
  }

  // only one is null
  if (first == null || second == null) {
    return false;
  }
  return first.draggableId === second.draggableId && first.droppableId === second.droppableId;
};
export const isCriticalEqual = (first, second) => {
  if (first === second) {
    return true;
  }
  const isDraggableEqual =
    first.draggable.id === second.draggable.id &&
    first.draggable.droppableId === second.draggable.droppableId &&
    first.draggable.type === second.draggable.type &&
    first.draggable.index === second.draggable.index;
  const isDroppableEqual = first.droppable.id === second.droppable.id && first.droppable.type === second.droppable.type;
  return isDraggableEqual && isDroppableEqual;
};
