"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[415],{415:function(e,r,o){o.r(r),o.d(r,{va_promo_banner:function(){return a}});var t=o(9213),n=function(e,r,o){if(o||2===arguments.length)for(var t,n=0,i=r.length;n<i;n++)!t&&n in r||(t||(t=Array.prototype.slice.call(r,0,n)),t[n]=r[n]);return e.concat(t||Array.prototype.slice.call(r))},i="DISMISSED_PROMO_BANNERS",a=function(){function e(e){(0,t.r)(this,e),this.closeEvent=(0,t.c)(this,"closeEvent",7),this.componentLibraryAnalytics=(0,t.c)(this,"component-library-analytics",7),this.href=void 0,this.type=void 0,this.disableAnalytics=!1,this.dismissedBanners=[]}return e.prototype.closeHandler=function(){if(this.closeEvent.emit(),this.el.id){var e=n(n([],this.dismissedBanners,!0),[this.el.id],!1);this.dismissedBanners=e,localStorage.setItem(i,JSON.stringify(e))}if(!this.disableAnalytics){var r={componentName:"va-promo-banner",action:"close",details:{text:this.el.innerText,type:this.type}};this.componentLibraryAnalytics.emit(r)}},e.prototype.handleLinkClick=function(){if(!this.disableAnalytics){var e={componentName:"va-promo-banner",action:"linkClick",details:{text:this.el.innerText,href:this.href,type:this.type}};this.componentLibraryAnalytics.emit(e)}},e.prototype.componentWillLoad=function(){var e=localStorage.getItem(i);this.dismissedBanners=e?JSON.parse(e):[],document.body.classList.add("va-pad-promo-banner")},e.prototype.render=function(){var e,r=this;return(null===(e=this.dismissedBanners)||void 0===e?void 0:e.includes(this.el.id))?(document.body.classList.remove("va-pad-promo-banner"),null):(0,t.h)(t.H,null,(0,t.h)("div",{class:"va-banner-body"},(0,t.h)("va-icon",{class:"va-promo-banner__icon",icon:{announcement:"campaign","email-signup":"mail",news:"info"}[this.type],size:4}),(0,t.h)("a",{class:"va-banner-content-link",href:this.href,onClick:function(){return r.handleLinkClick()}},(0,t.h)("slot",null)," ",(0,t.h)("va-icon",{icon:"chevron_right",size:3})),(0,t.h)("button",{type:"button","aria-label":"Dismiss this promo banner",onClick:function(){return r.closeHandler()}},(0,t.h)("va-icon",{icon:"close",size:3}))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,t.g)(this)},enumerable:!1,configurable:!0}),e}();a.style='p,a,ol,ul,li,dl,dt,dd,form,label,button{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.5}button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])),:host(.va-form-group--error){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1024px){:host([error]:not([error=""])),:host(.va-form-group--error){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1023px){:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){padding-left:0}}:host{z-index:1;position:fixed;bottom:0;left:0;width:100%;background-color:var(--vads-color-base-lightest);color:var(--vads-color-link);font-weight:700}.va-banner-body{max-width:62.5rem;margin:0 auto;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.va-promo-banner__icon{background-color:var(--vads-color-white);border-radius:50%;height:42px;width:42px;margin-left:0.5rem;margin-right:0.8rem;margin-top:0.8rem;margin-bottom:0.8rem;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;padding-top:4px}@media (max-width: 767px){.va-promo-banner__icon{display:none}}.va-banner-content-link{padding:0.5rem;line-height:1.375rem;text-decoration:none;color:var(--vads-color-link);-ms-flex-positive:2;flex-grow:2;border-right:1px solid var(--vads-color-base-lighter)}.va-banner-content-link:hover{text-decoration:underline}button{background:none;background-color:transparent;color:var(--vads-color-link);border:none;padding:10px;margin:0 0.5rem 0 1rem}button:hover{cursor:pointer}@media screen and (min-width: 768px){.va-banner-body>i{display:block}.va-banner-content-link{border:none}}'}}]);