var t,e,s={9144(t,e,s){s.d(e,{$_:()=>h,ZT:()=>d,wH:()=>m}),s(5983),s(1821);var r=s(9609),i=s(7154),n=s(4084),o=s(2927),a=s(8899),l=s(4955),c=s(4839),p=function(t,e,s,r){var i,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(o=(n<3?i(o):n>3?i(e,s,o):i(e,s))||o);return n>3&&o&&Object.defineProperty(e,s,o),o};const h=["default","accent","warning","error","success","default-momentum","promotional"],m=["center","leading"];var d;!function(t){let e=class extends o.LitElement{constructor(){super(...arguments),this.type="",this.titleText="",this.message="",this.closable=!1,this.show=!1,this.closeAriaLabel="Close Banner",this.showBannerTypeIcon=!1,this.showRefreshButton=!1,this.alignment="center"}connectedCallback(){super.connectedCallback()}onHide(){this.show=!this.show,this.dispatchEvent(new CustomEvent("alertBanner-hide"))}onRefreshClick(){this.dispatchEvent(new CustomEvent("alertBanner-refresh-button-click"))}handleKeyDown(t){const{code:e}=t;(0,i.o)(e)&&this.onHide()}get isLeadingAlignment(){return"leading"===this.alignment}static get styles(){return[n.A,c.A]}getIconForType(){switch(this.type){case"error":return"error-legacy-bold";case"warning":return"warning-bold";case"success":return"check-circle-bold";default:return"info-circle-bold"}}get alertBannerClassMap(){return{"md-alert-banner":!0,[`md-alert-banner--${this.type}`]:this.type,"md-alert-banner--leading":this.isLeadingAlignment||this.titleText,closable:this.closable,"with-title":!!this.titleText}}get alertBannerTextClassMap(){return{"md-alert-banner__text":!0,"md-alert-banner__with-title":!!this.titleText,leading:this.isLeadingAlignment||this.titleText}}get alertBannerRightClassMap(){return{trailing:this.isLeadingAlignment||this.titleText}}get closeButtonTemplate(){const t=this.titleText?"close-div with-title":"close-div";return o.html`
        <div class="${t}">
          <md-button
            class="md-alert-banner__close"
            hasRemoveStyle
            circle
            ariaLabel=${this.closeAriaLabel}
            @click=${this.onHide}
            @keydown=${this.handleKeyDown}
          >
            <md-icon name="cancel-bold" size="16" iconSet="momentumDesign"></md-icon>
          </md-button>
        </div>
      `}get titleTemplate(){return this.titleText?o.html`<div class="md-alert-banner__title">${this.titleText}</div>`:o.nothing}render(){const t=this.closable?o.html` ${this.closeButtonTemplate} `:o.nothing,e=this.showBannerTypeIcon||this.titleText?"with-icon":"",s=this.showBannerTypeIcon?o.html`
            <md-icon
              class=${(0,l.classMap)({"md-alert-banner__icon":!0,"with-title":!!this.titleText})}
              name="${this.getIconForType()}"
              iconSet="momentumDesign"
              size="20"
            >
            </md-icon>
          `:o.html`<slot name="left"></slot>`,r=this.titleText?"refresh-button-with-title":"refresh-button",i=this.showRefreshButton?o.html` <md-button
            class="${r}"
            @click=${this.onRefreshClick}
            variant="ghostInheritTextColor"
            circle
            size="20"
          >
            <md-icon name="refresh-bold" iconSet="momentumDesign" size="16"></md-icon>
          </md-button>`:o.nothing;return this.titleText?o.html`
          ${this.show?o.html`
                <div class="${(0,l.classMap)(this.alertBannerClassMap)}" role="alert">
                  <div class="${(0,l.classMap)(this.alertBannerTextClassMap)}">
                    <div class="md-alert-banner__text-content ${e}">
                      ${s} ${this.titleTemplate}
                      <slot><span>${this.message}</span></slot>
                    </div>
                  </div>
                  <div class="md-alert-banner__top-right-centered">
                    <div class="md-alert-banner__top-right-centered-content">
                      ${i}
                      <div class="md-alert-banner__right ${(0,l.classMap)(this.alertBannerRightClassMap)}">
                        <slot name="right"></slot>
                      </div>
                      ${t}
                    </div>
                  </div>
                </div>
              `:o.nothing}
        `:o.html`
          ${this.show?o.html`
                <div class="${(0,l.classMap)(this.alertBannerClassMap)}" role="alert">
                  <div class="${(0,l.classMap)(this.alertBannerTextClassMap)}">
                    ${s}
                    <slot><span>${this.message}</span></slot>
                    ${i}
                  </div>
                  <div class="md-alert-banner__right ${(0,l.classMap)(this.alertBannerRightClassMap)}">
                    <slot name="right"></slot>
                  </div>
                  ${t}
                </div>
              `:o.nothing}
        `}};p([(0,a.property)({type:String})],e.prototype,"type",void 0),p([(0,a.property)({type:String})],e.prototype,"titleText",void 0),p([(0,a.property)({type:String})],e.prototype,"message",void 0),p([(0,a.property)({type:Boolean})],e.prototype,"closable",void 0),p([(0,a.property)({type:Boolean})],e.prototype,"show",void 0),p([(0,a.property)({type:String,attribute:"close-aria-label"})],e.prototype,"closeAriaLabel",void 0),p([(0,a.property)({type:Boolean})],e.prototype,"showBannerTypeIcon",void 0),p([(0,a.property)({type:Boolean})],e.prototype,"showRefreshButton",void 0),p([(0,a.property)({type:String})],e.prototype,"alignment",void 0),e=p([(0,r.w)("md-alert-banner")],e),t.ELEMENT=e}(d||(d={}))}},r={};function i(t){var e=r[t];if(void 0!==e)return e.exports;var n=r[t]={exports:{}};return s[t](n,n.exports,i),n.exports}i.m=s,t=[],i.O=(e,s,r,n)=>{if(!s){var o=1/0;for(p=0;p<t.length;p++){for(var[s,r,n]=t[p],a=!0,l=0;l<s.length;l++)(!1&n||o>=n)&&Object.keys(i.O).every(t=>i.O[t](s[l]))?s.splice(l--,1):(a=!1,n<o&&(o=n));if(a){t.splice(p--,1);var c=r();void 0!==c&&(e=c)}}return e}n=n||0;for(var p=t.length;p>0&&t[p-1][2]>n;p--)t[p]=t[p-1];t[p]=[s,r,n]},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);export{i as __webpack_require__};e={6029:0},i.C=t=>{var s,r,{__webpack_esm_ids__:n,__webpack_esm_modules__:o,__webpack_esm_runtime__:a}=t,l=0;for(s in o)i.o(o,s)&&(i.m[s]=o[s]);for(a&&a(i);l<n.length;l++)r=n[l],i.o(e,r)&&e[r]&&e[r][0](),e[n[l]]=0;i.O()},i.O.j=t=>0===e[t];import*as n from"../9609.js";i.C(n);import*as o from"../4084.js";i.C(o);import*as a from"../4955.js";i.C(a);import*as l from"../3517.js";i.C(l);import*as c from"../1156.js";i.C(c);import*as p from"../3305.js";i.C(p);import*as h from"../4739.js";i.C(h);import*as m from"../7154.js";i.C(m);import*as d from"../9773.js";i.C(d);import*as g from"../5983.js";i.C(g);import*as v from"../7755.js";i.C(v);import*as f from"../1821.js";i.C(f);import*as y from"../4980.js";i.C(y);import*as u from"../9500.js";i.C(u);import*as b from"../519.js";i.C(b);import*as _ from"../4137.js";i.C(_);import*as w from"../8165.js";i.C(w);import*as C from"../4839.js";i.C(C);var T=i.O(void 0,[9609,4084,4955,3517,1156,3305,4739,7154,9773,5983,7755,1821,4980,9500,519,4137,8165,4839],()=>i(9144));const $=(T=i.O(T)).ZT,B=T.wH,x=T.$_;export{$ as AlertBanner,B as alertBannerAlignment,x as alertBannerType};