"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mouseReducer = exports.MOUSE_INITIAL_STATE = void 0;
var tslib_1 = require("tslib");
var type_guards_1 = require("../utils/type-guards");
var actions_1 = require("../constants/actions");
exports.MOUSE_INITIAL_STATE = {
    coords: undefined
};
function mouseReducer(state, action) {
    if (state === void 0) { state = exports.MOUSE_INITIAL_STATE; }
    switch (action.type) {
        case actions_1.ActionType.UPDATE_MOUSE_COORDINATES:
            {
                var data = action.payload.coord;
                if ((0, type_guards_1.isCoordinate)(data)) {
                    var state1 = { coords: data };
                    return tslib_1.__assign(tslib_1.__assign({}, state), state1);
                }
            }
    }
    return state;
}
exports.mouseReducer = mouseReducer;
//# sourceMappingURL=mouse.js.map