"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports._setSpecDatum = exports.$setDatum = exports.removeDatum = exports.setData = exports.removeData = void 0;
const f_1 = require("../../system/core/object/DeleteAll/f");
const f_2 = require("../../system/core/object/DeletePath/f");
const f_3 = require("../../system/f/object/Merge/f");
const f_4 = require("../../system/f/object/Set/f");
const object_1 = require("../../util/object");
const removeData = ({ ids }, state) => {
    return (0, f_1.default)(state, ids);
};
exports.removeData = removeData;
const setData = ({ data }, state) => {
    return (0, f_3.default)(state, data);
};
exports.setData = setData;
const removeDatum = ({ id }, state) => {
    return (0, f_2.default)(state, [id]);
};
exports.removeDatum = removeDatum;
const $setDatum = ({ id, datumSpec: value }, state) => {
    return (0, f_4.default)(state, id, value);
};
exports.$setDatum = $setDatum;
const _setSpecDatum = (spec, datumId, datumSpec) => {
    return (0, object_1.deepSet)(spec, ['data', datumId], datumSpec);
};
exports._setSpecDatum = _setSpecDatum;
//# sourceMappingURL=data.js.map