function _type_of(obj) {
    "@swc/helpers - typeof";
    return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
}
import { isValidElement, Children } from 'react';
export 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 (!isValidElement(textSource) || !textSource.props || !textSource.props.children) {
                    return '';
                }
                return Children.map(textSource.props.children, function(child) {
                    return extractTextFrom(child);
                }).join('');
            }
        default:
            return '';
    }
};
