import{r as s,c as t,h as i,H as e,g as a}from"./p-ClISz4NF.js";import{v as r}from"./p-CDIRBJsi.js";import{c as o}from"./p-CgDnDrq5.js";import{g as h}from"./p-CoD1xawt.js";import{t as c}from"./p-Cjg0wpDG.js";import"./p-vN03FcXN.js";import"./p-DNztiAH0.js";import"./p-CQvUntGY.js";const n={root:"gov-breadcrumbs"};const l=class{constructor(i){s(this,i);this.govChange=t(this,"gov-change");this.inited=false;this.collapsible=false;this.isExpanded=false;this.accessibleToggleLabel="Zobrazit či skrýt navigaci";this.expanded=false;this.toggleOption=false;this.h=h(this.host)}async componentDidRender(){this.scheduleContentVerification();if(o()){c((()=>this.validateAccessibility()))}}scheduleContentVerification(){if(this.inited)return;this.inited=true;c((()=>{this.calculateWidthOfItems();this.inited=false}))}calculateWidthOfItems(){const s=this.host.getBoundingClientRect().width;let t=0;this.host.querySelectorAll("li").forEach((s=>{t+=s.getBoundingClientRect().width}));this.toggleOption=t>s}render(){return i(e,{key:"5a2d10c3705a0d19458ea76e65ab6e0449eb620d",class:this.h.classes(n.root),expanded:this.expanded},i("nav",{key:"41b98c6ee95ea397f9802f5ac120d2674859cb4d","aria-label":this.accessibleLabel,"aria-labelledby":this.accessibleLabelledBy},i("slot",{key:"10fed9d58caa49017c34665e4b711252854040b7"})),this.toggleOption?i("gov-button",{size:"xs",color:"primary",type:"base","aria-label":this.accessibleToggleLabel,"aria-pressed":this.expanded,"aria-expanded":this.expanded,"on-gov-click":()=>this.expanded=!this.expanded},i("gov-icon",{name:this.expanded?"chevron-up":"chevron-down",type:"components"})):null)}async validateAccessibility(){r(this.accessibleLabel,this.accessibleLabelledBy,n.root,this.host);r(this.accessibleToggleLabel,undefined,n.root,this.host)}get host(){return a(this)}};export{l as gov_breadcrumbs};
//# sourceMappingURL=p-495e25d8.entry.js.map