import e from"../../../stylelint/lib/index.mjs";import t from"../../../../_virtual/sortNodeProperties.mjs";import{checkNode as o}from"./checkNode.mjs";import{namespace as r}from"../../utils/namespace.mjs";import{getContainingNode as i}from"../../utils/getContainingNode.mjs";import{isRuleWithNodes as l}from"../../utils/isRuleWithNodes.mjs";let s=r("properties-alphabetical-order"),m=e.utils.ruleMessages(s,{expected:(e,t)=>`Expected ${e} to come before ${t}`});function a(r){return function(a,u){if(!e.utils.validateOptions(u,s,{actual:r,possible:Boolean}))return;let n=[];a.walk(function(e){let r=i(e);if(n.includes(r))return;n.push(r);let a=!1;l(r)&&o(r,u,s,m,function(){a||(t(r,{order:"alphabetical"}),a=!0,o(r,u,s,m))})})}}a.ruleName=s,a.messages=m,a.meta={fixable:!0,url:"https://github.com/hudochenkov/stylelint-order/blob/master/rules/properties-alphabetical-order/README.md"};export{a as rule};