/**
 * Class for chaining Operations.
 * This Operation will process results of a given operation further, as specified in the processMotionResult / processEndResult methods
 * Extend this class whenever an Operations result depends on results of other Operations
 */
var ProcessFurtherOperation = /** @class */ (function () {
    function ProcessFurtherOperation(operation) {
        this.preceedingOperation = operation;
    }
    ProcessFurtherOperation.prototype.executeStart = function (request) {
        this.preceedingOperation.executeStart(request);
    };
    ProcessFurtherOperation.prototype.executeMotion = function (request) {
        var result = this.preceedingOperation.executeMotion(request);
        var motionResult = this.processMotionResult(result);
        if (request.hitInfosBelowMouse && motionResult.isInvalid) {
            motionResult.isInvalid = motionResult.isSnapInvalid;
        }
        return motionResult;
    };
    ProcessFurtherOperation.prototype.executeEnd = function (request) {
        var result = this.preceedingOperation.executeEnd(request);
        var endResult = this.processEndResult(result);
        return endResult;
    };
    return ProcessFurtherOperation;
}());
export { ProcessFurtherOperation };
