"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[9915],{9915:function(e,t,n){n.r(t),n.d(t,{va_sidenav:function(){return a}});var r=n(9213),a=function(){function e(e){var t=this;(0,r.r)(this,e),this.isDesktop=window.innerWidth>=768,this.iconBackgroundColorStyle=function(){return{backgroundColor:"var(--".concat(t.iconBackgroundColor,")")}},this.header=void 0,this.mobileHeader="Related pages menu",this.navAriaLabel="Related pages menu",this.iconName=void 0,this.iconBackgroundColor="vads-color-primary"}return e.prototype.handleResize=function(){this.isDesktop=window.innerWidth>=768,(0,r.f)(this)},e.prototype.setOnlyOneCurrentPage=function(){this.el.querySelectorAll("va-sidenav-item[current-page], va-sidenav-submenu[current-page]").forEach(function(e,t){t>0&&e.removeAttribute("current-page")})},e.prototype.setupCurrentPageObserver=function(){var e=this;this.mutationObserver=new MutationObserver(function(t){var n=t.filter(function(e){return"attributes"===e.type&&"current-page"===e.attributeName});if(n.length>0){var r=n.find(function(e){var t=e.target.getAttribute("current-page");return null!==t&&"false"!==t});if(r){var a=r.target;e.el.querySelectorAll("va-sidenav-item[current-page], va-sidenav-submenu[current-page]").forEach(function(e){e!==a&&e.removeAttribute("current-page")})}}}),this.mutationObserver.observe(this.el,{attributes:!0,attributeFilter:["current-page"],subtree:!0})},e.prototype.componentWillLoad=function(){this.setOnlyOneCurrentPage()},e.prototype.componentDidLoad=function(){this.setupCurrentPageObserver()},e.prototype.disconnectedCallback=function(){this.mutationObserver&&this.mutationObserver.disconnect()},e.prototype.render=function(){return this.isDesktop?(0,r.h)(r.H,null,(0,r.h)("nav",{"aria-label":this.navAriaLabel},this.header&&(0,r.h)("span",{class:"va-sidenav__header"},this.iconName?(0,r.h)("span",{class:"va-sidenav__icon-background",style:this.iconBackgroundColorStyle()},(0,r.h)("va-icon",{icon:this.iconName})):null,this.header),(0,r.h)("div",{role:"list",class:"va-sidenav__list"},(0,r.h)("slot",null)))):(0,r.h)(r.H,null,(0,r.h)("va-accordion",{"open-single":!0,bordered:!0},(0,r.h)("va-accordion-item",{exportparts:"accordion-content, accordion-header",header:this.mobileHeader},(0,r.h)("nav",{"aria-label":this.navAriaLabel},(0,r.h)("div",{role:"list",class:"va-sidenav__list"},(0,r.h)("slot",null))))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,r.g)(this)},enumerable:!1,configurable:!0}),e}();a.style=":host{display:block}.va-sidenav__list{margin-bottom:0;margin-top:0;list-style-type:none;padding-left:0;font-size:var(--vads-font-size-source-sans-normalized);line-height:var(--vads-font-line-height-2);border-top:1px solid var(--vads-color-base-lighter)}.va-sidenav__header{-ms-flex-align:center;align-items:center;color:var(--vads-color-base);display:-ms-flexbox;display:flex;font-family:var(--font-serif);font-size:var(--font-size-h4);font-weight:var(--font-weight-bold);margin-bottom:12px;margin-top:0}.va-sidenav__header .va-sidenav__icon-background{font-size:24px}.va-sidenav__icon-background{color:var(--vads-color-white);border-radius:50%;width:40px;height:40px;margin-right:8px;position:relative}.va-sidenav__icon-background va-icon{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}va-accordion-item::part(accordion-header){padding-left:1.4rem}"}}]);