import{__decorate as e}from"tslib";import{html as t}from"lit";import{property as i,customElement as s}from"lit/decorators.js";import{s as r}from"./nile-side-bar.css.esm.js";import{N as l}from"../internal/nile-element.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";let o=class extends l{constructor(){super(...arguments),this.position="left",this.collapsed=!1,this.fullHeight=!1,this.width=null,this.collapsedWidth=null}static get styles(){return[r]}updated(e){super.updated(e),e.has("collapsed")&&this.querySelectorAll("\n          nile-side-bar-logo,\n          nile-side-bar-footer-item,\n          nile-side-bar-group-item,\n          nile-side-bar-group,\n          nile-side-bar-header,\n          nile-side-bar-group-item-text,\n          nile-side-bar-group-item-icon,\n          nile-side-bar-expand\n        ").forEach((e=>e.toggleAttribute("collapsed",this.collapsed))),e.has("width")&&null!==this.width&&this.style.setProperty("--sidebar-width",`${this.width}px`),e.has("collapsedWidth")&&null!==this.collapsedWidth&&this.style.setProperty("--sidebar-collapsed-width",`${this.collapsedWidth}px`)}render(){return t`
      <slot name="header" part="header"></slot>
      <div class="scroll-container" part="scroll-container">
        <slot></slot>
      </div>
      <slot name="footer" part="footer"></slot>
    `}};e([i({type:String,reflect:!0,attribute:!0})],o.prototype,"position",void 0),e([i({type:Boolean,reflect:!0,attribute:!0})],o.prototype,"collapsed",void 0),e([i({type:Boolean,reflect:!0,attribute:!0})],o.prototype,"fullHeight",void 0),e([i({type:Number,attribute:!0})],o.prototype,"width",void 0),e([i({type:Number,attribute:!0})],o.prototype,"collapsedWidth",void 0),o=e([s("nile-side-bar")],o);export{o as N};
