"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.extractPuppeteerSelector = exports.extractPuppeteerSelectorMapping = void 0;
const firstArg = (args) => args[0];
exports.extractPuppeteerSelectorMapping = {
    $: firstArg,
    $$: firstArg,
    $$eval: firstArg,
    $eval: firstArg,
    $x: Function.prototype,
    focus: firstArg,
    hover: firstArg,
    click: firstArg,
    type: firstArg,
    tap: firstArg,
    select: firstArg,
    waitFor(args) {
        if (typeof args[0] === 'string') {
            return args[0];
        }
        return undefined;
    },
    waitForSelector: firstArg,
};
function extractPuppeteerSelector(fnName, args) {
    const extractor = exports.extractPuppeteerSelectorMapping[fnName] || (() => undefined);
    return extractor(args);
}
exports.extractPuppeteerSelector = extractPuppeteerSelector;
