import e from"../../../../../_virtual/index13.mjs";import{__require as t}from"../../utils/isSingleLineString.mjs";import{__require as i}from"../../utils/namespace.mjs";import{__require as r}from"../../utils/ruleUrl.mjs";import{__require as s}from"../../utils/validateTypes.mjs";var a,n;function o(){if(n)return a;n=1;const{utils:o}=e,l=t(),u=i(),m=r(),{isBoolean:c}=s(),f=u("at-if-closing-brace-newline-after"),p=o.ruleMessages(f,{expected:'Expected newline after "}" of @if statement',rejected:'Unexpected newline after "}" of @if statement'}),x={url:m(f),fixable:!0};function d(e,t,i){return(r,s)=>{o.validateOptions(s,f,{actual:e,possible:["always-last-in-chain"]},{actual:t,possible:{disableFix:c},optional:!0})&&_({root:r,result:s,ruleName:f,atRuleName:"if",expectation:e,messages:p,context:i,options:t})}}function _({root:e,result:t,ruleName:i,atRuleName:r,expectation:s,messages:a,context:n,options:u}){const m=!0!==u?.disableFix;function c(e,r,s,a){o.report({result:t,ruleName:i,node:e,message:r,index:s,endIndex:s,fix:m?()=>{e.next().raws.before=a}:void 0})}e.walkAtRules(e=>{if(e.name!==r)return;const t=e.next();if(!t)return;const i=t.raws.before,o=i&&!l(i),u=e.toString().length;"always-last-in-chain"===s&&("atrule"!==t.type||"else"!==t.name&&"elseif"!==t.name?o||c(e,a.expected,u,n.newline):o&&c(e,a.rejected,u," "))})}return d.ruleName=f,d.messages=p,d.meta=x,d.sassConditionalBraceNLAfterChecker=_,a=d}export{o as __require};