'use strict';
import { ESLintUtils } from '@typescript-eslint/utils';
import { url, ruleTypes } from '@flint/infra/constants/rules-meta';
import _0x1869d0__default from 'path';
import { folders } from '../../../base-repo/app-constants/project-paths.js';
import { flintRuleIdentifiers } from '@flint/infra/constants/shared-string-identifiers';

const ruleName='no-fd-prefix-in-folders';const messageId='noPrefixInFolders',constants={'ignoredPathParts':[flintRuleIdentifiers['inputFile'],folders['pages'],'toolbox'],'ignoredExactMatchFolder':'fd'},createRule=ESLintUtils['RuleCreator'](_0x4d5306=>''+url+_0x4d5306),noPrefixInFolders=createRule({'name':ruleName,'meta':{'type':ruleTypes['problem'],'docs':{'description':'Must\x20not\x20use\x20fd\x20prefix\x20in\x20folder\x20names'},'messages':{[messageId]:ruleName+'\x0aFolder\x20name\x20\x27{{folder}}\x27\x20must\x20not\x20start\x20with\x20\x27fd\x27.\x0a\x0a###\x20**Must\x20not**\x20use\x20fd\x20prefix\x20in\x20folder\x20names.\x0a\x0a####\x20Wrong\x0a\x0asrc/fd/fd-component-toolbox/fd-component/Component.ts\x0a\x0a####\x20Correct\x0a\x0asrc/fd/fd-component-toolbox/component/Component.ts\x0a\x0a####\x20Why\x0a\x0afd\x20prefix\x20is\x20only\x20used\x20for\x20category\x20folders.'},'schema':[]},'defaultOptions':[],'create'(_0x46b44a){return {'Program'(){const _0xeb1761=_0x46b44a['filename'],_0x5e1920=_0x1869d0__default['dirname'](_0xeb1761)['split'](/[/\\]+/)['filter'](Boolean);for(const _0x2ea97b of _0x5e1920){const _0x528da=_0x2ea97b['toLowerCase']();if(_0x528da['startsWith'](constants['ignoredExactMatchFolder'])&&!constants['ignoredExactMatchFolder']['includes'](_0x528da)){const _0x11f245=constants['ignoredPathParts']['some'](_0x361657=>_0x528da['includes'](_0x361657));if(!_0x11f245){_0x46b44a['report']({'loc':{'line':0x1,'column':0x0},'messageId':messageId,'data':{'folder':_0x2ea97b}});return;}}}}};}});

export { noPrefixInFolders as default, ruleName };
