// Copyright 1999-2023. Plesk International GmbH. All rights reserved.

import { isValidElement } from 'react';
import Translate from './Translate';
export const isLikeText = node => {
  if (typeof node === 'string') {
    return true;
  }
  if ( /*#__PURE__*/isValidElement(node) && node.type === Translate) {
    const {
      component,
      children
    } = node.props;
    if (typeof component === 'undefined' && (typeof children === 'string' || typeof children === 'undefined' || children === null)) {
      return true;
    }
  }
  return false;
};