"use strict";
const pathsConstants = require("react-native-plugin3/scripts/pathsConstants").default;
const fileOperation = require("react-native-plugin3/scripts/fileOperationHelper").default;
const originalSourceMapInfo = require("./getSourceMapInfoOrig");
const pathNode = require('path');
function getSourceMapInfo(module, options) {
    let dataOrig = originalSourceMapInfo(module, options);
    try {
        if (!options.excludeSource) {
            let correctPath = module.path.replace(pathsConstants.getApplicationPath(), "") + ".dtx";
            dataOrig.source = fileOperation.readTextFromFileSync(pathNode.join(pathsConstants.getBuildPath(), correctPath));
        }
    }
    catch (e) {
    }
    finally {
        return dataOrig;
    }
}
module.exports = getSourceMapInfo;
