'use strict';
import { createEslintRule } from '@flint/infra/create-eslint-rule';
import { isTestFile, isGetIdFunction, isCallExpression } from '@flint/infra/analysis';

const ruleName='must-not-use-multiple-get-id-functions-inline-in-test';const ruleContent='\x0a###\x20**Must**\x20not\x20use\x20multiple\x20get\x20ID\x20functions\x20inline\x20in\x20test.\x0a\x0a####\x20Wrong\x0a\x0agetFooId(getBarId(baz));\x0a\x0a####\x20Correct\x0a\x0aconst\x20barId\x20=\x20getBarId(baz);\x0agetFooId(baz);\x0a\x0a####\x20Why\x0a\x0aExtracting\x20nested\x20getter\x20functions\x20into\x20separate\x20variables\x20improves\x20code\x20readability,\x20simplifies\x20debugging,\x20and\x20makes\x20the\x20test\x20flow\x20easier\x20to\x20understand.';var mustNotUseMultipleGetIdFunctionsInlineInTest = createEslintRule(ruleName,ruleContent,_0x206a71=>{return {'CallExpression'(_0x1f9590){if(!isTestFile(_0x206a71['filename'])||!isGetIdFunction(_0x1f9590['callee']))return;for(const _0x23df90 of _0x1f9590['arguments']){isCallExpression(_0x23df90)&&isGetIdFunction(_0x23df90['callee'])&&_0x206a71['report']({'node':_0x1f9590,'messageId':ruleName});}}};});

export { mustNotUseMultipleGetIdFunctionsInlineInTest as default, ruleName };
