import e from"../../../stylelint/lib/index.mjs";import{getContainingNode as o}from"../../utils/getContainingNode.mjs";import{isRuleWithNodes as i}from"../../utils/isRuleWithNodes.mjs";import{checkNode as r}from"./checkNode.mjs";import{createOrderInfo as t}from"./createOrderInfo.mjs";import{validatePrimaryOption as m}from"./validatePrimaryOption.mjs";import{ruleName as s}from"./ruleName.mjs";import{messages as n}from"./messages.mjs";function l(n,l={}){return function(p,a){if(!e.utils.validateOptions(a,s,{actual:n,possible:m},{actual:l,possible:{unspecified:["top","bottom","ignore"]},optional:!0}))return;let u=l.unspecified||"ignore",f=t(n),d=[];p.walk(function(e){let t=o(e);d.includes(t)||(d.push(t),i(t)&&r({node:t,orderInfo:f,primaryOption:n,result:a,unspecified:u}))})}}l.ruleName=s,l.messages=n,l.primaryOptionArray=!0,l.meta={fixable:!0,url:"https://github.com/hudochenkov/stylelint-order/blob/master/rules/order/README.md"};export{l as rule};