import{r as o,h as e,a,g as t}from"./p-d52b3602.js";import{c as r}from"./p-c608c6dc.js";const i=class{constructor(e){o(this,e),this.tag="li",this.href="#",this.active=!1,this.bold=!1,this.condensed=!1,this.handleClick=o=>{o.preventDefault(),this.expanded=!this.expanded},this.handleKeydown=o=>{o.metaKey||o.ctrlKey||o.shiftKey||o.defaultPrevented||"Space"===o.code&&(this.expanded=!this.expanded)}}nestingLevelChanged(o){1===o&&(this.bold=!0)}render(){const o=this.tag;return e(a,null,this.styles&&e("style",null,this.styles),e(o,{part:this.getBasePartMap(),class:this.getCssClassMap(),role:"listitem"},e("div",{class:"sidebar-nav-collapsible__wrapper",part:"wrapper"},e("a",{href:this.href,class:"sidebar-nav-collapsible__button",onClick:this.handleClick,onKeyDown:this.handleKeydown,role:"button","aria-expanded":this.expanded?"true":"false",part:r("button",this.active&&"button-active")},this.label,e("scale-icon-navigation-collapse-down",{class:"sidebar-nav-collapsible__icon",selected:this.bold,size:20,part:"icon"}))),e("ul",{hidden:!this.expanded,class:"sidebar-nav-collapsible__list",part:"list"},e("slot",null))))}getBasePartMap(){return this.getCssOrBasePartMap("basePart")}getCssClassMap(){return this.getCssOrBasePartMap("css")}getCssOrBasePartMap(o){const e="sidebar-nav-collapsible",a="basePart"===o?"":`${e}--`;return r(e,this.condensed&&`${a}condensed`,this.active&&`${a}active`)}get el(){return t(this)}static get watchers(){return{nestingLevel:["nestingLevelChanged"]}}};i.style=":host{--opacity-chevron:1;--border-bottom-color:var(--telekom-color-ui-faint);--border-left-color-third-nesting:var(--telekom-color-ui-strong);--color-active:var(--telekom-color-text-and-icon-primary-pressed);--color-hover:var(--telekom-color-text-and-icon-primary-hovered);--color-primary:var(--telekom-color-text-and-icon-primary-standard);--background-color-before-active:var(--color-primary);--font-weight-bold:var(--telekom-typography-font-weight-bold);--box-shadow-focus:inset 0 0 0 var(--telekom-line-weight-highlight)\n    var(--telekom-color-functional-focus-standard)}.sidebar-nav-collapsible{margin:0;border-bottom-color:var(--border-bottom-color);border-bottom-style:solid;border-bottom-width:0}.sidebar-nav-collapsible--condensed{border-bottom-width:1px}.sidebar-nav-collapsible__wrapper{border-bottom-color:var(--border-bottom-color);border-bottom-style:solid;border-bottom-width:1px}.sidebar-nav-collapsible--condensed .sidebar-nav-collapsible__wrapper{border-bottom-width:0}.sidebar-nav-collapsible__button{color:currentColor;width:100%;display:flex;box-sizing:border-box;text-align:left;align-items:center;padding-top:1rem;padding-right:calc(0.5 * var(--spacing-indent));padding-bottom:1rem;padding-left:var(--spacing-indent);justify-content:space-between;text-decoration:none;font-family:inherit;border-radius:var(--telekom-radius-small)}.sidebar-nav-collapsible__button:hover{color:var(--color-hover)}.sidebar-nav-collapsible__button:active{color:var(--color-active)}.sidebar-nav-collapsible__button:focus{outline:none;box-shadow:var(--box-shadow-focus)}.sidebar-nav-collapsible--active .sidebar-nav-collapsible__button{position:relative;color:var(--color-primary)}.sidebar-nav-collapsible--active .sidebar-nav-collapsible__button::before{content:'';display:block;position:absolute;top:0;left:var(--left-current-border, 0);width:0;height:100%;background-color:var(--color-primary);border-left:2px solid transparent}.sidebar-nav-collapsible--active:hover .sidebar-nav-collapsible__button::before{background-color:var(--color-hover)}.sidebar-nav-collapsible--active:active .sidebar-nav-collapsible__button::before{background-color:var(--color-active)}:host([nesting-level='1']) .sidebar-nav-collapsible__button,.sidebar-nav-collapsible--bold .sidebar-nav-collapsible__button{font-weight:var(--font-weight-bold)}:host([nesting-level='2']) .sidebar-nav-collapsible__button{padding-left:calc(var(--spacing-indent) + 0.75rem)}.sidebar-nav-collapsible__icon{transition:opacity 150ms}[aria-expanded='true'] .sidebar-nav-collapsible__icon{transform:rotate(0.5turn)}@media (hover: hover){[aria-expanded='false'] .sidebar-nav-collapsible__icon{opacity:var(--opacity-chevron, 1)}.sidebar-nav-collapsible__button:hover .sidebar-nav-collapsible__icon{opacity:1}.sidebar-nav-collapsible__button:focus .sidebar-nav-collapsible__icon{opacity:1}}.sidebar-nav-collapsible__list{list-style:none;padding-left:0;margin-top:0;margin-bottom:0;border-bottom-width:1px;}.sidebar-nav-collapsible--condensed .sidebar-nav-collapsible__list{margin-top:1em;margin-left:var(--spacing-indent);margin-bottom:2em}";export{i as scale_sidebar_nav_collapsible}