import{isString as e,isRegExp as s}from"../../utils/validateTypes.mjs";import t from"../../utils/getRuleSelector.mjs";import r from"../../utils/isStandardSyntaxRule.mjs";import l from"../../utils/matchesStringOrRegExp.mjs";import o from"../../utils/parseSelector.mjs";import i from"../../utils/report.mjs";import m from"../../utils/ruleMessages.mjs";import u from"../../utils/validateOptions.mjs";import a from"../../utils/vendor.mjs";const n="selector-pseudo-element-allowed-list",p=m(n,{rejected:e=>`Unexpected pseudo-element "${e}"`}),d=m=>(d,c)=>{u(c,n,{actual:m,possible:[e,s]})&&d.walkRules(e=>{r(e)&&e.selector.includes("::")&&o(t(e),c,e)?.walkPseudos(s=>{const t=s.value;if(":"!==t.charAt(1))return;const r=t.slice(2);if(l(r,m))return;if(l(a.unprefixed(r),m))return;const o=s.sourceIndex,u=o+t.length;i({index:o,endIndex:u,message:p.rejected,messageArgs:[t],node:e,result:c,ruleName:n})})})};d.primaryOptionArray=!0,d.ruleName=n,d.messages=p,d.meta={url:"https://stylelint.io/user-guide/rules/selector-pseudo-element-allowed-list"};export{d as default};