import{isRoot as r,isComment as e,hasSource as n,isDocument as t}from"./typeGuards.mjs";function o(o){const s=o.parent;if(void 0===s)return!1;if(r(s)&&!function({parent:r}){return Boolean(r&&t(r))}(s))return!1;if(o===s.first)return!0;const u=s.nodes;if(!u)return!1;const i=u[0];if(!i)return!1;if(!e(i)||"string"==typeof i.raws.before&&i.raws.before.includes("\n"))return!1;if(!n(i)||!i.source.start)return!1;const f=i.source.start.line;if(!i.source.end||f!==i.source.end.line)return!1;for(const[r,t]of u.entries())if(0!==r){if(t===o)return!0;if(!e(t)||n(t)&&t.source.end&&t.source.end.line!==f)return!1}return!1}export{o as default};