"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.extractPuppeteerText = exports.extractPuppeteerTextMapping = void 0;
const secondArg = (args) => args[1];
const firstArg = (args) => args[0];
const returnValue = (_, returnValue) => typeof returnValue === 'string' ? returnValue : undefined;
exports.extractPuppeteerTextMapping = {
    type: secondArg,
    evaluate: returnValue,
    goto: firstArg,
    $eval: returnValue,
};
function extractPuppeteerText(fnName, args, returnValue) {
    const extractor = exports.extractPuppeteerTextMapping[fnName] || (() => undefined);
    return extractor(args, returnValue);
}
exports.extractPuppeteerText = extractPuppeteerText;
