import e from"../../../../../_virtual/index13.mjs";import{__require as r}from"../../utils/atRuleParamIndex.mjs";import{__require as t}from"../../utils/optionsHaveIgnored.mjs";import{__require as n}from"../../utils/parseFunctionArguments.mjs";import{__require as a}from"../../utils/namespace.mjs";import{__require as s}from"../../utils/ruleUrl.mjs";var i,u;function m(){if(u)return i;u=1;const{utils:m}=e,l=r(),o=t(),{parseFunctionArguments:c}=n(),d=a(),p=s(),g=d("at-mixin-named-arguments"),f=m.ruleMessages(g,{expected:"Expected a named parameter to be used in at-include call",rejected:"Unexpected a named parameter in at-include call"}),x={url:p(g)},_=/\((.*)\)$/,j=/^\$\S*/;function h(e,r){return(t,n)=>{if(!m.validateOptions(n,g,{actual:e,possible:["always","never"]},{actual:r,possible:{ignore:["single-argument"]},optional:!0}))return;const a=o(r,"single-argument");t.walkAtRules("include",r=>{const t=r.params.replace(/\n/g," ").match(_);if(!t||-1===t.index||2===t[0].length)return;const s=c(r.params);if(0===s.length)return;if(1===s.length&&a)return;const i=l(r);s.forEach(({key:t,index:a,endIndex:s})=>{switch(e){case"never":if(!t)return;m.report({message:f.rejected,node:r,result:n,ruleName:g,index:i+a,endIndex:i+s});break;case"always":if(t&&j.test(t))return;m.report({message:f.expected,node:r,result:n,ruleName:g,index:i+a,endIndex:i+s})}})})}}return h.ruleName=g,h.messages=f,h.meta=x,i=h}export{m as __require};