"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.setRemoteInstance = setRemoteInstance;
const isPlainObject_1 = __importDefault(require("lodash/isPlainObject"));
function setRemoteInstance(instance, fetchData) {
    var _a;
    // @ts-ignore
    if ((0, isPlainObject_1.default)((_a = instance === null || instance === void 0 ? void 0 : instance.remoteOperation) === null || _a === void 0 ? void 0 : _a.current)) {
        // @ts-ignore
        instance.remoteOperation.current.fetchData = fetchData;
    }
}
