import { Optional } from '@ephox/katamari';
import { SugarPosition } from '@ephox/sugar';
const getDataFrom = (touches) => {
    const touch = touches[0];
    return Optional.some(SugarPosition(touch.clientX, touch.clientY));
};
const getData = (event) => {
    const raw = event.raw;
    const touches = raw.touches;
    return touches.length === 1 ? getDataFrom(touches) : Optional.none();
};
// When dragging the touch, the delta is simply the difference
// between the two touch positions (previous/old and next/nu)
const getDelta = (old, nu) => SugarPosition(nu.left - old.left, nu.top - old.top);
export { getData, getDelta };
//# sourceMappingURL=TouchData.js.map