/*! For license information please see 6034.app.bundle.js.LICENSE.txt */
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[4164,6034],{4164:function(t,e,n){n.r(e),n.d(e,{c:function(){return i}});var r,a={exports:{}};r=a,function(){var t={}.hasOwnProperty;function e(){for(var n=[],r=0;r<arguments.length;r++){var a=arguments[r];if(a){var i=typeof a;if("string"===i||"number"===i)n.push(a);else if(Array.isArray(a)){if(a.length){var o=e.apply(null,a);o&&n.push(o)}}else if("object"===i)if(a.toString===Object.prototype.toString)for(var l in a)t.call(a,l)&&a[l]&&n.push(l);else n.push(a.toString())}}return n.join(" ")}r.exports?(e.default=e,r.exports=e):window.classNames=e}();var i=a.exports},6034:function(t,e,n){n.r(e),n.d(e,{va_language_toggle:function(){return o}});var r=n(9213),a=n(4164),i=function(t,e,n){if(n||2===arguments.length)for(var r,a=0,i=e.length;a<i;a++)!r&&a in e||(r||(r=Array.prototype.slice.call(e,0,a)),r[a]=e[a]);return t.concat(r||Array.prototype.slice.call(e))},o=function(){function t(t){(0,r.r)(this,t),this.vaLanguageToggle=(0,r.c)(this,"vaLanguageToggle",7),this.componentLibraryAnalytics=(0,r.c)(this,"component-library-analytics",7),this.language="en",this.enHref=void 0,this.esHref=void 0,this.tlHref=void 0,this.urls=void 0,this.routerLinks=!1}return t.prototype.getUrl=function(t){var e=new URL(window.location.href);return e.searchParams.set("lang",t),e.href},t.prototype.handleToggle=function(t,e,n){this.routerLinks&&(t.preventDefault(),window.history.replaceState(null,null,this.getUrl(e)),this.language=e),this.vaLanguageToggle.emit({language:e});var r={componentName:"va-language-toggle",action:"linkClick",details:{"pipe-delimited-list-header":e,label:n}};this.componentLibraryAnalytics.emit(r)},t.prototype.componentWillLoad=function(){this.urls=[{label:"English",lang:"en",href:this.enHref}],this.esHref&&(this.urls=i(i([],this.urls,!0),[{label:"Español",lang:"es",href:this.esHref}],!1)),this.tlHref&&(this.urls=i(i([],this.urls,!0),[{label:"Tagalog",lang:"tl",href:this.tlHref}],!1))},t.prototype.render=function(){var t,e=this,n=this.language,i=this.urls,o=(null===(t=i.find(function(t){return t.lang===n}))||void 0===t?void 0:t.label)||"English";return(0,r.h)(r.H,{key:"77005cba47593b08881ed80f9b5e346c720e1d17"},(0,r.h)("div",{key:"edd5300bfd308ad4cfb4005afa6cf92a1c9b2710",role:"group","aria-label":"Language selection ".concat(o)},i.map(function(t,o){var l=t.href,s=t.lang,c=t.label,h=(0,a.c)({"is-current-lang":s===n}),u=(0,a.c)({"inner-div":o<i.length-1});return s===n?(0,r.h)("div",{class:u},(0,r.h)("a",{class:h,href:l,hrefLang:s,onClick:function(t){return e.handleToggle(t,s,c)},"aria-current":"true"},c)):(0,r.h)("div",{class:u},(0,r.h)("va-link",{class:h,href:l,language:s,onClick:function(t){return e.handleToggle(t,s,c)},text:c,disableAnalytics:!0}))})))},t}();o.style=":host{font-size:1rem}:host div{display:inline-block}:host div div.inner-div{border-right:1px solid var(--vads-color-base-light);padding-right:var(--units-1);margin-right:var(--units-1)}:host div a.is-current-lang{font-weight:var(--font-weight-bold);color:var(--vads-color-black);text-decoration:none;padding-top:var(--units-1p5);padding-bottom:var(--units-2)}:host div a.is-current-lang:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}:host div va-link::part(anchor){text-decoration:none;padding-top:var(--units-1p5);padding-bottom:var(--units-2)}:host div va-link{color:var(--vads-color-link);padding-bottom:2px;border-bottom:1px solid var(--vads-color-link)}"}}]);