import e from"../../../stylelint/lib/index.mjs";import{isString as r}from"../../utils/validateType.mjs";import{ruleName as t}from"./ruleName.mjs";import{messages as o}from"./messages.mjs";import{hasEmptyLineBefore as m}from"./hasEmptyLineBefore.mjs";import{removeEmptyLinesBefore as i}from"./removeEmptyLinesBefore.mjs";function p({propData:p,primaryOption:s,emptyLineBeforeUnspecified:a,context:n,result:f}){let l=!1;if(p.orderData){let e=s.filter(e=>!r(e));l=e[p.orderData.separatedGroup-2]&&e[p.orderData.separatedGroup-2].emptyLineBefore}else a&&(l=!0);l&&m(p.node)&&e.utils.report({message:o.rejectedEmptyLineBefore(p.name),node:p.node,result:f,ruleName:t,fix:()=>{i(p.node,n.newline)}})}export{p as checkEmptyLineBeforeFirstProp};