"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getElementByText = void 0;
/**
 * Ищет элемент по тексту внутри него
 */
const getElementByText = (parent, text) => {
    if (parent.innerHTML === text) {
        return parent;
    }
    for (let i = 0; i < parent.children.length; i += 1) {
        const found = (0, exports.getElementByText)(parent.children[i], text);
        if (found) {
            return found;
        }
    }
    return null;
};
exports.getElementByText = getElementByText;
