import { __assign, __rest } from "tslib";
import { deepMix, isEqual } from '@antv/util';
/**
 * 深克隆图层配置项
 */
export var deepMergeLayerOptions = function (options, srcOptions) {
    var source = options.source, restOptions = __rest(options, ["source"]);
    var srcSource = srcOptions.source, restSrcOptions = __rest(srcOptions, ["source"]);
    var target = __assign(__assign({}, deepMix(restOptions, restSrcOptions)), { source: __assign(__assign({}, source), srcSource) });
    return target;
};
/**
 * 判断 source 数据是否发生改变
 */
export var isSourceChanged = function (source, currentSource) {
    var data = source.data, restOptions = __rest(source, ["data"]);
    var currentData = currentSource.data, restCurrentOptions = __rest(currentSource, ["data"]);
    var changed = data !== currentData || !isEqual(restOptions, restCurrentOptions);
    return changed;
};
//# sourceMappingURL=index.js.map