"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[7663],{7663:function(e,t,i){i.r(t),i.d(t,{va_loading_indicator:function(){return r}});var a=i(9213),r=function(){function e(e){(0,a.r)(this,e),this.componentLibraryAnalytics=(0,a.c)(this,"component-library-analytics",7),this.loadingStartTime=null,this.observer=null,this.message=void 0,this.label="Loading",this.setFocus=!1,this.enableAnalytics=!1}return e.prototype.componentDidLoad=function(){var e,t=this;this.setFocus&&this.spinner&&this.spinner.focus(),this.loadingStartTime=Date.now();var i=null===(e=this.el)||void 0===e?void 0:e.parentNode;i instanceof Node&&(this.observer=new MutationObserver(function(e){for(var a=0,r=e;a<r.length;a++){var n=r[a];if("childList"===n.type){var o=Array.from(n.removedNodes.values()).filter(function(e){var t;return"va-loading-indicator"===(null===(t=null==e?void 0:e.tagName)||void 0===t?void 0:t.toLowerCase())}).length>0;if(t.enableAnalytics&&o){var s=new CustomEvent("component-library-analytics",{bubbles:!0,composed:!0,detail:{componentName:"va-loading-indicator",action:"displayed",details:{displayTime:Date.now()-t.loadingStartTime,message:t.message}}});i.dispatchEvent(s)}}}}),this.observer.observe(i,{childList:!0}))},e.prototype.render=function(){var e=this,t=this.message,i=this.label,r="loading-indicator";return function(){var e="undefined"!=typeof window&&window;return!(!e||!e.navigator.userAgent.match(/Chromatic/)&&!e.location.href.match(/chromatic=true/))}()&&(r+=" chromatic"),(0,a.h)(a.H,{key:"8a24109ab8b6b401627ad5249b5133b90871351e","aria-live":"polite"},(0,a.h)("div",{key:"696ffcdadd577100f66e376e52f9ca3ad27411b7",ref:function(t){return e.spinner=t},class:r,role:"progressbar","aria-label":i,"aria-valuetext":t,tabindex:"-1"}),t)},Object.defineProperty(e.prototype,"el",{get:function(){return(0,a.g)(this)},enumerable:!1,configurable:!0}),e}();r.style=":host{display:block;font-size:1.06rem;text-align:center}.loading-indicator{display:block;height:4rem;margin-top:1rem}.loading-indicator:after{content:' ';display:inline-block;width:2.1875rem;height:2.1875rem;margin:1px;border-radius:50%;border:8px solid var(--vads-color-primary);border-color:var(--vads-color-primary) transparent var(--vads-color-primary)\n    transparent;-webkit-animation:spin 1.5s linear infinite;animation:spin 1.5s linear infinite}.loading-indicator.chromatic:after{-webkit-animation:none;animation:none}.loading-indicator:focus{outline:none}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}"}}]);