import e from"../../../../../_virtual/index13.mjs";import{__require as r}from"../../utils/declarationValueIndex.mjs";import{__require as i}from"../../utils/isSingleLineString.mjs";import{__require as t}from"../../utils/whitespaceChecker.mjs";import{__require as l}from"../../utils/validateTypes.mjs";import{__require as s}from"../../utils/namespace.mjs";import{__require as n}from"../../utils/ruleUrl.mjs";var a,o;function u(){if(o)return a;o=1;const{utils:u}=e,m=r(),c=i(),p=t(),{isBoolean:f}=l(),d=s(),w=n(),x=d("dollar-variable-colon-newline-after"),_=u.ruleMessages(x,{expectedAfter:()=>'Expected newline after ":"',expectedAfterMultiLine:()=>'Expected newline after ":" with a multi-line value'}),b={url:w(x),fixable:!0};function v(e,r,i){const t=p("newline",e,_);return(l,s)=>{if(!u.validateOptions(s,x,{actual:e,possible:["always","always-multi-line"]},{actual:r,possible:{disableFix:f},optional:!0}))return;const n=!0!==r?.disableFix;l.walkDecls(r=>{if(!r.prop||"$"!==r.prop[0])return;const l=r.value.trim(),a="("===l[0],o=")"===l[l.length-1],p=/\)\s*!default$/.test(l);if(a&&(o||p)&&!c(l))return;const f=m(r)+r.raw("between").length-1,d=r.toString().slice(0,f);for(let l=0,a=d.length;l<a;l++){if(":"!==d[l])continue;const a="/*"===d.substr(d[l],3)?d.indexOf("*/",l)+1:l;t.afterOneOnly({source:d,index:a,lineCheckStr:r.value,err:t=>{u.report({message:t,node:r,index:a,endIndex:a,result:s,ruleName:x,fix:n?()=>{const t="always"===e?r.raws.before.replace(i.newline,""):r.value.split(i.newline)[1].replace(/^(\s+).*$/,(e,r)=>r);r.raws.between=r.raws.between.replace(/:(.*)$/,`:${i.newline}${t}`)}:void 0})}});break}})}}return v.ruleName=x,v.messages=_,v.meta=b,a=v}export{u as __require};