'use strict';
import { createEslintRule } from '@flint/infra/create-eslint-rule';
import { isNameMatch, hasCorrectCountOfGenericParameters, isIdentifier } from '@flint/infra/analysis';

var __defProp=Object['defineProperty'],__name=(_0x776dad,_0x27eea3)=>__defProp(_0x776dad,'name',{'value':_0x27eea3,'configurable':!![]});const ruleName='must-specify-second-generic-parameter-in-apipost-and-apiput';const ruleContent='\x0a###\x20**Must**\x20specify\x20second\x20generic\x20parameter\x20in\x20apiPost\x20and\x20apiPut\x0a\x0a####\x20Wrong\x0a\x0aconst\x20foo\x20=\x20apiPost<bar>(baz,\x20qux)\x20{}\x0a\x0a####\x20Correct\x0a\x0aconst\x20foo\x20=\x20apiPost<bar,\x20baz>(baz,\x20qux)\x20{}\x0a\x0a####\x20Why\x0a\x0aAdds\x20an\x20additional\x20level\x20of\x20type\x20checking\x20to\x20prevent\x20further\x20errors\x20and\x20type\x20inconsistencies.';var mustSpecifySecondGenericParameterInApipostAndApiput = createEslintRule(ruleName,ruleContent,__name(function create(_0x3c1b6b){return {'CallExpression'(_0x87dd6b){const _0x56142d=isNameMatch(_0x87dd6b['callee'],'apiPost')&&!hasCorrectCountOfGenericParameters(_0x87dd6b),_0xac9b2c=isNameMatch(_0x87dd6b['callee'],'apiPut')&&!hasCorrectCountOfGenericParameters(_0x87dd6b);isIdentifier(_0x87dd6b['callee'])&&(_0x56142d||_0xac9b2c)&&_0x3c1b6b['report']({'node':_0x87dd6b,'messageId':ruleName});}};},'create'));

export { mustSpecifySecondGenericParameterInApipostAndApiput as default, ruleContent, ruleName };
