const navTest=document.querySelector("#nav-test");navTest&&(navTest._links=[{_label:"1 Navigationspunkt mit sehr langem Link-Test",_href:"#asdf",_icons:"codicon codicon-flame"},{_label:"2 Navigationspunkt und ich_bin_ein_echt_langes_zusammengesetztes_Worte_und_versuche_das_Layout_zu_brechen",_on:{onClick:()=>{alert("hallo")}},_icons:"codicon codicon-flame"},{_label:"3 Navigationspunkt mit viel Text zu was testen",_href:"#abc",_icons:"codicon codicon-flame",_children:[{_label:"3.1 Navigationspunkt",_href:"#abc",_icons:"codicon codicon-flame"},{_label:"3.2 Navigationspunkt",_href:"#abc",_icons:"codicon codicon-flame",_target:"asdasd"},{_icons:"codicon codicon-flame",_label:"3.3 Navigationspunkt",_href:"#abc3.3",_children:[{_icons:"codicon codicon-flame",_label:"3.3.1 Navigationspunkt",_href:"#abc"},{_icons:"codicon codicon-flame",_label:"3.3.2 Navigationspunkt",_href:"#abc"}]},{_icons:"codicon codicon-flame",_label:"3.4 Navigationspunkt",_href:"#abc3.4",_children:[{_icons:"codicon codicon-flame",_label:"3.4.1 Navigationspunkt",_href:"#abc"},{_icons:"codicon codicon-flame",_label:"3.4.2 Navigationspunkt",_href:"#abc"}]},{_icons:"codicon codicon-flame",_label:"3.5 Navigationspunkt",_href:"#abc"}]},{_label:"4 Navigationspunkt mit viel Text zu was testen",_icons:"codicon codicon-flame",_children:[{_label:"4.1 Navigationspunkt",_href:"#abc",_icons:"codicon codicon-flame"},{_label:"4.2 Navigationspunkt",_href:"#abc",_icons:"codicon codicon-flame",_target:"asdasd"},{_icons:"codicon codicon-flame",_label:"4.3 Navigationspunkt",_href:"#abc",_children:[{_icons:"codicon codicon-flame",_label:"4.3.1 Navigationspunkt",_href:"#abc"},{_icons:"codicon codicon-flame",_label:"4.3.2 Navigationspunkt",_href:"#abc"}]},{_icons:"codicon codicon-flame",_label:"4.4 Navigationspunkt",_href:"#abc",_children:[{_icons:"codicon codicon-flame",_label:"4.4.1 Navigationspunkt",_href:"#abc"},{_icons:"codicon codicon-flame",_label:"4.4.2 Navigationspunkt",_href:"#abc"}]},{_icons:"codicon codicon-flame",_label:"4.5 Navigationspunkt",_href:"#abc"}]}]);const clickNav=document.querySelector("#click-nav");function createEntry(n){return{_label:n.getAttribute("_heading"),_href:`#${n.id}`,_icons:"codicon codicon-flame"}}function populateNavFromElements(n,o,c){const a=[];let e=0,i=0,l=null;o.forEach((n=>{if(e>=c&&(e=0),0===e){const n=i*c;l={_label:`Komponente ${n+1} bis ${n+c}`,_icons:"codicon codicon-flame",_children:[]},a.push(l),i++}l._children.push(createEntry(n)),e++})),n._links=a}clickNav&&(clickNav._links=[{_label:"1 Navigationspunkt mit sehr langem Link-Test",_on:{onClick:()=>{alert("hallo")}},_icons:"icofont-woodpecker"},{_label:"2 Navigationspunkt und ich_bin_ein_echt_langes_zusammengesetztes_Worte_und_versuche_das_Layout_zu_brechen",_on:{onClick:()=>{alert("hallo")}},_icons:"icofont-woodpecker"},{_active:!0,_label:"3 Navigationspunkt",_href:"#abc",_icons:"icofont-woodpecker",_children:[{_label:"3.1 Navigationspunkt",_href:"#abc",_icons:"icofont-woodpecker"},{_label:"3.2 Navigationspunkt",_href:"#abc",_icons:"icofont-woodpecker",_target:"asdasd"},{_active:!0,_label:"3.3 Navigationspunkt",_href:"#abc",_children:[{_active:!0,_label:"3.3.1 Navigationspunkt (aktiv)",_href:"#abc"},{_label:"3.3.2 Navigationspunkt",_href:"#abc"}]},{_label:"3.4 Navigationspunkt",_href:"#abc",_children:[{_label:"3.4.1 Navigationspunkt",_href:"#abc"},{_label:"3.4.2 Navigationspunkt",_href:"#abc"}]},{_label:"3.5 Navigationspunkt",_href:"#abc"}]},{_label:"4 Navigationspunkt",_href:"#abc"}]),setTimeout((()=>{const n=document.querySelector("#main-nav"),o=document.querySelectorAll("main > kol-accordion");n&&o?.length>0&&populateNavFromElements(n,o,6)}),1e3);