import getPageBorderBoxCenterFromImpact from "../get-page-border-box-center";
import getClientFromPageBorderBoxCenter from "./get-client-from-page-border-box-center";

const getClientBorderBoxCenter = ({ impact, draggable, droppable, draggables, viewport, afterCritical }) => {
  const pageBorderBoxCenter = getPageBorderBoxCenterFromImpact({
    impact,
    draggable,
    draggables,
    droppable,
    afterCritical
  });
  return getClientFromPageBorderBoxCenter({
    pageBorderBoxCenter,
    draggable,
    viewport
  });
};

export default getClientBorderBoxCenter;
