import{r as t,g as i,h as e,d as s}from"./p-b3a13b6a.js";import{s as n,o as a}from"./p-ae5756dd.js";import"./p-2132ad75.js";const d='pn-button-dropdown .pn-button-dropdown>pn-button>.pn-button{min-height:initial}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}@media screen and (max-width: 767px){.sr-only-mobile{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}}pn-sidenav-level{display:block;flex-basis:100%}pn-sidenav-level[data-level="2"]{padding-left:2.5em;overflow:hidden;transition:max-height ease 0.2s;max-height:40em}pn-sidenav-level[data-level="2"][aria-hidden=true]{max-height:0}';const h=d;const o=class{constructor(i){t(this,i);this.level=1;this.levelId="";this.isOpen=false;this.parentName="";this.parentHref="";this.parentLinkId="";this.alignment="right"}get hostElement(){return i(this)}async componentWillLoad(){const t=this.hostElement.parentElement;if(t.tagName.toLowerCase()!=="nav"){this.level=2}if(t.tagName.toLowerCase()==="pn-sidenav-link"){this.parentName=t.getAttribute("name")+"";this.parentHref=t.getAttribute("href")+"";this.parentLinkId=t.getAttribute("linkid")+"";const i=this.parentName.toLowerCase().replace(/\W/gi,"_");this.levelId=`sidenav-lvl${this.level}-${i}`;if(t.getAttribute("current")+""==="true"){n.openLevel=this.levelId;this.onChangeOpenLevel()}}a("openLevel",(()=>{this.onChangeOpenLevel()}))}onOpen(){}onChangeOpenLevel(){this.isOpen=n.openLevel===this.levelId}render(){const t={"aria-hidden":this.level>1?!this.isOpen+"":null,"data-level":this.level+"",id:this.levelId??""};return e(s,{key:"49181ad9c3005878ceb520b87ac1721f86f9d220",...t,"data-asdfasdf":this.isOpen},e("slot",{key:"43331c462c778d7dfaf5830bb7d4acccb4b9d3e6"}))}static get watchers(){return{isOpen:["onOpen"]}}};o.style=h;export{o as pn_sidenav_level};
//# sourceMappingURL=p-46581fa4.entry.js.map