import e from"../../utils/getRuleSelector.mjs";import t from"../../utils/isStandardSyntaxCombinator.mjs";import s from"../../utils/isStandardSyntaxRule.mjs";import{isString as r}from"../../utils/validateTypes.mjs";import o from"../../utils/parseSelector.mjs";import i from"../../utils/report.mjs";import l from"../../utils/ruleMessages.mjs";import a from"../../utils/validateOptions.mjs";const m="selector-combinator-disallowed-list",u=l(m,{rejected:e=>`Unexpected combinator "${e}"`}),n=l=>(n,d)=>{a(d,m,{actual:l,possible:[r]})&&n.walkRules(r=>{s(r)&&o(e(r),d,r)?.walkCombinators(e=>{if(!t(e))return;const{value:s}=e,o=function(e){return e.replace(/\s+/g," ")}(s);if(!l.includes(o))return;const{sourceIndex:a,raws:n}=e,p=a+(n&&n.value||s).length;i({result:d,ruleName:m,message:u.rejected,messageArgs:[o],node:r,index:a,endIndex:p})})})};n.primaryOptionArray=!0,n.ruleName=m,n.messages=u,n.meta={url:"https://stylelint.io/user-guide/rules/selector-combinator-disallowed-list"};export{n as default};