import{checkAlphabeticalOrder as e}from"../../utils/checkAlphabeticalOrder.mjs";import{prefix as t}from"../../utils/vendor.mjs";function o({firstPropertyData:o,secondPropertyData:r,allPropertiesData:a,unspecified:i}){function n(e,t=o,a=r){return{isCorrect:e,firstNode:t,secondNode:a}}let d=o.name.toLowerCase(),s=r.name.toLowerCase();if(o.unprefixedName.toLowerCase()===r.unprefixedName.toLowerCase())return!t(d).length&&t(s).length?n(!1):n(!0);const l=Boolean(o.orderData),p=Boolean(r.orderData);if(l&&p)return n(o.orderData.expectedPosition<=r.orderData.expectedPosition);if(!l&&p){let e=a.slice(0,-1).reverse().find(e=>Boolean(e.orderData));if(e&&e.orderData&&e.orderData.expectedPosition>r.orderData.expectedPosition)return n(!1,e,r)}return"bottomAlphabetical"===i&&l&&!p?n(!0):"bottomAlphabetical"!==i||l||p?"bottomAlphabetical"!==i||l?(l||p)&&("ignore"!==i||l&&p)&&("top"!==i||l)?"top"!==i||p?"bottom"!==i||p?"bottom"!==i||l?void 0:n(!1):n(!0):n(!1):n(!0):n(!1):e(o,r)?n(!0):n(!1)}export{o as checkOrder};