import{isString as e,isRegExp as s}from"../../utils/validateTypes.mjs";import{atRuleParamIndex as t}from"../../utils/nodeFieldIndices.mjs";import{atRuleRegexes as r}from"../../utils/regexes.mjs";import m from"../../utils/findMediaFeatureNames.mjs";import i from"../../utils/getAtRuleParams.mjs";import a from"../../utils/isCustomMediaQuery.mjs";import l from"../../utils/matchesStringOrRegExp.mjs";import o from"../../utils/report.mjs";import u from"../../utils/ruleMessages.mjs";import d from"../../utils/validateOptions.mjs";const n="media-feature-name-allowed-list",p=u(n,{rejected:e=>`Unexpected media feature name "${e}"`}),f=u=>(f,j)=>{d(j,n,{actual:u,possible:[e,s]})&&f.walkAtRules(r.mediaName,e=>{m(i(e),s=>{const[,,r,m,{value:i}]=s;if(a(i))return;if(l(i,u))return;const d=t(e);o({message:p.rejected,messageArgs:[i],node:e,index:d+r,endIndex:d+m+1,ruleName:n,result:j})})})};f.primaryOptionArray=!0,f.ruleName=n,f.messages=p,f.meta={url:"https://stylelint.io/user-guide/rules/media-feature-name-allowed-list"};export{f as default};