"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.isLikeText = void 0;
var _react = require("react");
var _Translate = _interopRequireDefault(require("./Translate"));
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.

const isLikeText = node => {
  if (typeof node === 'string') {
    return true;
  }
  if ( /*#__PURE__*/(0, _react.isValidElement)(node) && node.type === _Translate.default) {
    const {
      component,
      children
    } = node.props;
    if (typeof component === 'undefined' && (typeof children === 'string' || typeof children === 'undefined' || children === null)) {
      return true;
    }
  }
  return false;
};
exports.isLikeText = isLikeText;