"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.supportsFillForEnterText = supportsFillForEnterText;
const NON_FILLABLE_INPUT_TYPES = new Set([
    'button',
    'submit',
    'reset',
    'image',
    'file',
    'checkbox',
    'radio',
    'hidden',
]);
function supportsFillForEnterText(selector) {
    if (!selector) {
        return true;
    }
    const tagName = (selector.tag_name ?? '').toLowerCase();
    const inputType = (selector.inputElementType ?? '').toLowerCase();
    if (tagName === 'textarea') {
        return true;
    }
    if (tagName === 'input') {
        if (NON_FILLABLE_INPUT_TYPES.has(inputType)) {
            return false;
        }
        return true;
    }
    if (selector.contenteditable === true ||
        selector.contenteditable === 'true' ||
        selector.role === 'textbox') {
        return true;
    }
    return false;
}
