"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "valueSetter", {
    enumerable: true,
    get: function() {
        return valueSetter;
    }
});
const _object = require("../../../helpers/object");
function valueSetter(newValue, row, column) {
    const sourceDataAtCell = this.getSourceDataAtCell(this.toPhysicalRow(row), this.toPhysicalColumn(column));
    if ((0, _object.isKeyValueObject)(sourceDataAtCell)) {
        return (0, _object.isKeyValueObject)(newValue) ? newValue : {
            key: newValue,
            value: newValue
        };
    }
    return newValue;
}
