'use strict';
import { nodeTypes } from '@flint/infra/analysis/function-analysis';
import { isCallExpression, isJSXNode } from '@flint/infra/analysis/node-type-type-guards';
import { flintConstants } from '@flint/infra/constants/rules-meta';

var __defProp=Object['defineProperty'],__name=(_0x17cf95,_0x2c1d55)=>__defProp(_0x17cf95,'name',{'value':_0x2c1d55,'configurable':!![]});const childrenMap={[nodeTypes['blockStatement']]:_0x28e79e=>_0x28e79e['type']===nodeTypes['blockStatement']?_0x28e79e['body']:[],[nodeTypes['returnStatement']]:_0x438778=>_0x438778['type']===nodeTypes['returnStatement']?[_0x438778['argument']??void(0xd1f*0x1+0x1*0x1bbf+-0x28de)]:[],[nodeTypes['conditionalExpression']]:_0x40abec=>{return _0x40abec['type']===nodeTypes['conditionalExpression']?[_0x40abec['test'],_0x40abec['consequent'],_0x40abec['alternate']]:[];},[nodeTypes['logicalExpression']]:_0xf6fe88=>_0xf6fe88['type']===nodeTypes['logicalExpression']?[_0xf6fe88['left'],_0xf6fe88['right']]:[],[nodeTypes['binaryExpression']]:_0xde7a98=>_0xde7a98['type']===nodeTypes['binaryExpression']?[_0xde7a98['left'],_0xde7a98['right']]:[],[nodeTypes['callExpression']]:_0xac604c=>_0xac604c['type']===nodeTypes['callExpression']?_0xac604c['arguments']['filter'](_0x236c57=>_0x236c57['type']!==nodeTypes['spreadElement']):[],[nodeTypes['arrowFunctionExpression']]:_0x4ca9c7=>_0x4ca9c7['type']===nodeTypes['arrowFunctionExpression']?[_0x4ca9c7['body']]:[],[nodeTypes['functionExpression']]:_0x3d9944=>_0x3d9944['type']===nodeTypes['functionExpression']?[_0x3d9944['body']]:[],[nodeTypes['ifStatement']]:_0x18e743=>{return _0x18e743['type']===nodeTypes['ifStatement']?[_0x18e743['test'],_0x18e743['consequent'],_0x18e743['alternate']??void(0xe62+-0xa44+-0x41e)]:[];},[nodeTypes['expressionStatement']]:_0x260cfb=>_0x260cfb['type']===nodeTypes['expressionStatement']?[_0x260cfb['expression']]:[]};function hasJSXReturn(_0x561878){if(!_0x561878['body'])return ![];return _0x561878['body']['type']===nodeTypes['blockStatement']?_0x561878['body']['body']['some'](_0x553b7b=>_0x553b7b['type']===nodeTypes['returnStatement']&&_0x553b7b['argument']&&containsJSX(_0x553b7b['argument'])):containsJSX(_0x561878['body']);}__name(hasJSXReturn,'hasJSXReturn');function isReactMethodCall(_0x139054,_0x5d19d7){const _0x436bc8=isCallExpression(_0x139054)?_0x139054['callee']:_0x139054;return _0x436bc8['type']===nodeTypes['memberExpression']&&_0x436bc8['object']['type']===nodeTypes['identifier']&&_0x436bc8['object']['name']===flintConstants['react']&&_0x436bc8['property']['type']===nodeTypes['identifier']&&(_0x5d19d7===void(0x2ed*-0xd+-0x1969+0x3f72)||_0x436bc8['property']['name']===_0x5d19d7);}__name(isReactMethodCall,'isReactMethodCall');function containsJSX(_0x577cb7,_0x3850c6=0x653+-0x17b7+-0x27c*-0x7){if(!_0x577cb7||_0x3850c6>0xd43+0x2f*-0x13+0x49*-0x22)return ![];if(isJSXNode(_0x577cb7))return !![];const _0x5a7c54=childrenMap[_0x577cb7['type']];if(!_0x5a7c54)return ![];return _0x5a7c54(_0x577cb7)['some'](_0x2cba81=>_0x2cba81&&containsJSX(_0x2cba81,_0x3850c6+(0x248c+-0x228c+-0x1ff)));}__name(containsJSX,'containsJSX');

export { hasJSXReturn, isReactMethodCall };
