import e from"../../../../../_virtual/index13.mjs";import{__require as r}from"../../utils/atRuleParamIndex.mjs";import{__require as s}from"../../utils/namespace.mjs";import{__require as a}from"../../utils/ruleUrl.mjs";import{__require as t}from"../../utils/whitespaceChecker.mjs";var i,n;function l(){if(n)return i;n=1;const{utils:l}=e,o=r(),u=s(),m=a(),p=t(),f=u("at-else-if-parentheses-space-before"),c=l.ruleMessages(f,{rejectedBefore:()=>"Unexpected whitespace before parentheses in else-if declaration",expectedBefore:()=>"Expected a single space before parentheses in else-if declaration"}),d={url:m(f),fixable:!0};function x(e){return(r,s)=>{if(!l.validateOptions(s,f,{actual:e,possible:["always","never"]}))return;const a=/^if\s*\(/,t="always"===e?"if (":"if(",i=p("space",e,c).before;r.walkAtRules("else",e=>{if(!a.test(e.params))return;const r=()=>{e.params=e.params.replace(a,t)},n=e.params.indexOf("("),u=o(e);i({source:e.params,index:n,err:a=>l.report({message:a,node:e,result:s,ruleName:f,index:u+n,endIndex:u+n,fix:r})})})}}return x.ruleName=f,x.messages=c,x.meta=d,i=x}export{l as __require};