"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "extractTextFrom", {
    enumerable: true,
    get: function() {
        return extractTextFrom;
    }
});
var _react = require("react");
function _type_of(obj) {
    "@swc/helpers - typeof";
    return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
}
var extractTextFrom = function extractTextFrom1(textSource) {
    switch(typeof textSource === "undefined" ? "undefined" : _type_of(textSource)){
        case 'string':
            return textSource;
        case 'number':
            return textSource.toString();
        case 'object':
            {
                if (!(0, _react.isValidElement)(textSource) || !textSource.props || !textSource.props.children) {
                    return '';
                }
                return _react.Children.map(textSource.props.children, function(child) {
                    return extractTextFrom(child);
                }).join('');
            }
        default:
            return '';
    }
};
