function i(a){return a.path?.alias||(a.drupal_internal__nid?`/node/${a.drupal_internal__nid}`:"#")}function p(a){const r=new Map,t=[];return a.forEach(n=>{r.set(n.id,{...n,_children:[],_hasSubmenu:!1})}),a.forEach(n=>{const e=r.get(n.id);if(n.parent&&r.has(n.parent)){const s=r.get(n.parent);s._children.push(e),s._hasSubmenu=!0}else t.push(e)}),t}export{i as getNodePath,p as sortMenu};
