import e from"../../../../../_virtual/index13.mjs";import{__require as r}from"../../utils/namespace.mjs";import{__require as a}from"../../utils/ruleUrl.mjs";var s,t;function i(){if(t)return s;t=1;const{utils:i}=e,n=r(),m=a(),u=n("at-rule-conditional-no-parentheses"),l=i.ruleMessages(u,{rejected:"Unexpected () used to surround statements for @-rules"}),o={url:m(u),fixable:!0},c=["if","while","else"];function f(e,r,a){i.report({message:l.rejected,node:e,result:r,ruleName:u,word:e.params.replace(/\bif\b/,""),fix:a})}function p(e){return(r,a)=>{i.validateOptions(a,u,{actual:e})&&r.walkAtRules(e=>{if(!c.includes(e.name))return;const r=()=>{const r=e.params.match(/(if)? ?\((.*)\)/).slice(1);"else"!==e.name&&(e.raws.afterName=""),e.params=[...new Set(r)].join(" ")};"else"===e.name?e.params.match(/ ?if ?\(.*\) ?$/)&&f(e,a,r):e.params.trim().match(/^\(.*\)$/)&&f(e,a,r)})}}return p.ruleName=u,p.messages=l,p.meta=o,s=p}export{i as __require};