!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx"],e);else{var o="object"==typeof exports?e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx")):e(t.lit,t["lit/decorators.js"],t["lit/directives/class-map.js"],t["lit/directives/style-map.js"],t["lit/directives/if-defined.js"],t["@momentum-ui/icons/data/momentumUiIconsNames.json"],t["@momentum-ui/utils/lib/getColorValue"],t.mobx);for(var i in o)("object"==typeof exports?exports:t)[i]=o[i]}}(self,(t,e,o,i,r,n,s,l)=>(()=>{"use strict";var a,d={5925(t,e,o){o.r(e),o.d(e,{Alert:()=>i}),o(1821),o(5095);var i,r=o(9609),n=o(4084),s=o(7161),l=o(429),a=o(5125),d=o(226),p=function(t,e,o,i){var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};!function(t){let e=class extends s.LitElement{constructor(){super(...arguments),this.closable=!1,this.message="",this.show=!1,this.internalClose=!0,this.title="",this.btnlabel="Close",this.type="default",this.inline=!1,this.newMomentum=!1,this.primaryButton="",this.primaryButtonVariant="primary",this.primaryButtonColor="",this.secondaryButton="",this.link=!1,this.showMore=!1,this.href="",this.hasFooterSlotContent=!1,this.renderIconTemplate=()=>{switch(this.type){case"error":return s.html`
            <md-icon
              name="error-legacy-bold"
              size="${this.newMomentum?24:32}"
              iconSet="momentumDesign"
              color="var(--md-alert-error-text-color, red)"
            ></md-icon>
          `;case"info":return s.html`
            <md-icon
              name="info-circle-bold"
              size="${this.newMomentum?24:32}"
              iconSet="momentumDesign"
              color="var(--md-alert-info-text-color, blue)"
            ></md-icon>
          `;case"success":return s.html`
            <md-icon
              name="check-circle-bold"
              size="${this.newMomentum?24:32}"
              iconSet="momentumDesign"
              color="var(--md-alert-success-text-color, green)"
            ></md-icon>
          `;case"warn":case"warning":return s.html`
            <md-icon
              name="warning-bold"
              size="${this.newMomentum?24:32}"
              iconSet="momentumDesign"
              color="var(--md-alert-warning-text-color, orange)"
            ></md-icon>
          `;case"message":return s.html`
            <md-icon
              name="chat-bold"
              size="${this.newMomentum?24:32}"
              iconSet="momentumDesign"
              color="var(--alert-title-text-color)"
            ></md-icon>
          `;case"loading":return s.html`<md-spinner size="24"></md-spinner>`;default:return s.html` <slot name="alert-icon"></slot> `}}}connectedCallback(){super.connectedCallback(),this.updateFooterSlotInUse()}close(){this.dispatchEvent(new CustomEvent("alert-close",{composed:!0,bubbles:!0})),this.internalClose&&(this.show=!1)}static get styles(){return[n.A,d.A]}get alertClassMap(){return{[`md-alert--${this.type}`]:!!this.type,"md-alert__inline":this.inline}}get slottedFooterClassMap(){return{"is-empty":!this.hasFooterSlotContent}}legacyRender(){return s.html`
        <div role="alert" aria-live="polite" part="alert" class="md-alert ${(0,a.classMap)(this.alertClassMap)}">
          <div class="md-alert__icon aria-hidden=true">${this.renderIconTemplate()}</div>
          <div part="content" class="md-alert__content">
            ${this.title&&""!==this.title?s.html` <div class="md-alert__title" role="heading" aria-level="1">${this.title}</div> `:s.nothing}
            <div class="md-alert__message">
              ${this.message}
              <slot name="alert-body"></slot>
            </div>
          </div>
          ${this.closable?s.html`
                <div class="md-alert__button">
                  <md-button
                    ariaLabel="${this.btnlabel}"
                    hasRemoveStyle
                    color="color-none"
                    circle
                    @click=${()=>this.close()}
                  >
                    <md-icon slot="icon" name="cancel-bold" size="18" iconSet="momentumDesign"></md-icon>
                  </md-button>
                </div>
              `:s.html`
                <div class="md-alert__footer">
                  <slot name="alert-footer"></slot>
                </div>
              `}
        </div>
      `}renderNewAlertDefaultFooter(){return s.html`
        <div class="md-new-alert__footer">
          ${this.link?s.html`
                <md-link href="${this.href}">
                  <span class="md-new-alert__link"
                    >Link
                    <md-icon
                      name="pop-out-bold"
                      size="16"
                      iconSet="momentumDesign"
                      color="var(--md-alert-info-text-color, blue)"
                    >
                    </md-icon>
                  </span>
                </md-link>
              `:s.nothing}
          ${this.secondaryButton?s.html` <md-button variant="secondary" .clickFunction="${this.secondaryButtonClickFunction}">
                ${this.secondaryButton}
              </md-button>`:s.nothing}
          ${this.primaryButton?s.html`<md-button
                variant=${this.primaryButtonVariant}
                color=${this.primaryButtonColor}
                .clickFunction="${this.primaryButtonClickFunction}"
              >
                ${this.primaryButton}
              </md-button>`:s.nothing}
        </div>
      `}handleSlotContentChange(t){this.updateFooterSlotInUse()}updateFooterSlotInUse(){var t;this.hasFooterSlotContent=(null===(t=this.alertFooterSlot)||void 0===t?void 0:t.assignedNodes().length)>0}renderSlottedFooter(){return s.html` <div class="md-new-alert__footer ${(0,a.classMap)(this.slottedFooterClassMap)}">
        <slot name="alert-footer" @slotchange=${this.handleSlotContentChange}></slot>
      </div>`}newRender(){var t,e;return s.html`
        <div role="alert" aria-live="polite" part="alert" class="md-new-alert ${(0,a.classMap)(this.alertClassMap)}">
          <div class="md-new-alert__body">
            <div class="md-new-alert__icon aria-hidden=true">${this.renderIconTemplate()}</div>
            <div part="content" class="md-new-alert__content">
              ${this.title&&""!==this.title?s.html` <div class="md-new-alert__title" role="heading" aria-level="1">${this.title}</div> `:s.nothing}
              <div class="md-new-alert__message" part="message" title="${null===(t=this.message)||void 0===t?void 0:t.trim()}">
                <span class="md-new-alert__message_span" part="text">${null===(e=this.message)||void 0===e?void 0:e.trim()}</span>
                <slot name="alert-body"></slot>
                ${this.showMore?s.html`<md-link href=${this.href} inline>Show more...</md-link>`:s.nothing}
              </div>
            </div>
            ${this.closable?s.html`
                  <div class="md-new-alert__button">
                    <md-button
                      ariaLabel="${this.btnlabel}"
                      hasRemoveStyle
                      color="color-none"
                      circle
                      @click=${()=>this.close()}
                    >
                      <md-icon slot="icon" name="cancel-bold" size="16" iconSet="momentumDesign"></md-icon>
                    </md-button>
                  </div>
                `:s.nothing}
          </div>
          ${this.primaryButton||this.secondaryButton||this.link?this.renderNewAlertDefaultFooter():this.renderSlottedFooter()}
        </div>
      `}get alertRender(){return this.newMomentum?this.newRender():this.legacyRender()}render(){return s.html` ${this.show?this.alertRender:s.nothing} `}};p([(0,l.property)({type:Boolean})],e.prototype,"closable",void 0),p([(0,l.property)({type:String})],e.prototype,"message",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"show",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"internalClose",void 0),p([(0,l.property)({type:String})],e.prototype,"title",void 0),p([(0,l.property)({type:String})],e.prototype,"btnlabel",void 0),p([(0,l.property)({type:String})],e.prototype,"type",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"inline",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"newMomentum",void 0),p([(0,l.property)({type:String})],e.prototype,"primaryButton",void 0),p([(0,l.property)({type:String})],e.prototype,"primaryButtonVariant",void 0),p([(0,l.property)({type:String})],e.prototype,"primaryButtonColor",void 0),p([(0,l.property)()],e.prototype,"primaryButtonClickFunction",void 0),p([(0,l.property)({type:String})],e.prototype,"secondaryButton",void 0),p([(0,l.property)()],e.prototype,"secondaryButtonClickFunction",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"link",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"showMore",void 0),p([(0,l.property)({type:String})],e.prototype,"href",void 0),p([(0,l.query)('slot[name="alert-footer"]')],e.prototype,"alertFooterSlot",void 0),p([(0,l.state)()],e.prototype,"hasFooterSlotContent",void 0),e=p([(0,r.w)("md-alert")],e),t.ELEMENT=e}(i||(i={}))},5095(t,e,o){var i,r=o(9609),n=o(4084),s=o(7161),l=o(429),a=o(5125),d=o(291),p=o(476),m=function(t,e,o,i){var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};!function(t){let e=class extends s.LitElement{constructor(){super(...arguments),this.color="",this.ariaLabel="",this.ariaRole="link",this.disabled=!1,this.inline=!1,this.inlineStyle=void 0,this.inverted=void 0,this.href="",this.tag="a",this.target="_self",this.size=void 0,this._tabIndex=0,this.autofocus=!1}get tabIndex(){return this._tabIndex}set tabIndex(t){const e=this._tabIndex;this._tabIndex=t,this.requestUpdate("tabIndex",e)}static get styles(){return[n.A,p.A]}firstUpdated(){this.autofocus&&requestAnimationFrame(()=>{this.focus()})}focus(){var t;null===(t=this.linkRef)||void 0===t||t.focus()}blur(){var t;null===(t=this.linkRef)||void 0===t||t.blur()}get linkClassNamesInfo(){return{[`md-link--${this.color}`]:this.color,"md-link--inline":this.inline,[`md-link--inline-style-${this.inlineStyle}`]:!!this.inlineStyle,[`${this.size}`]:!!this.size,inverted:!0===this.inverted,disabled:this.disabled}}get linkElement(){switch(this.tag){case"div":return s.html`
            <div
              class="md-link ${(0,a.classMap)(this.linkClassNamesInfo)}"
              tabindex=${this.tabIndex}
              aria-label=${(0,d.ifDefined)(this.ariaLabel||void 0)}
              aria-disabled=${(0,d.ifDefined)(this.disabled||void 0)}
              role=${this.ariaRole}
              part="link"
            >
              <slot></slot>
            </div>
          `;case"span":return s.html`
            <span
              class="md-link ${(0,a.classMap)(this.linkClassNamesInfo)}"
              tabindex=${this.tabIndex}
              aria-label=${(0,d.ifDefined)(this.ariaLabel||void 0)}
              aria-disabled=${(0,d.ifDefined)(this.disabled||void 0)}
              role=${this.ariaRole}
              part="link"
            >
              <slot></slot>
            </span>
          `;default:return s.html`
            <a
              class="md-link ${(0,a.classMap)(this.linkClassNamesInfo)}"
              .target="${this.target}"
              href=${(0,d.ifDefined)(this.disabled?void 0:this.href)}
              tabindex=${this.tabIndex}
              aria-label=${(0,d.ifDefined)(this.ariaLabel||void 0)}
              aria-disabled=${(0,d.ifDefined)(this.disabled||void 0)}
              role=${this.ariaRole}
              part="link"
            >
              <slot></slot>
            </a>
          `}}render(){return s.html` ${this.linkElement} `}};m([(0,l.property)({type:String,attribute:!1})],e.prototype,"color",void 0),m([(0,l.property)({type:String})],e.prototype,"ariaLabel",void 0),m([(0,l.property)({type:String})],e.prototype,"ariaRole",void 0),m([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),m([(0,l.property)({type:Boolean})],e.prototype,"inline",void 0),m([(0,l.property)({type:String,attribute:"inline-style"})],e.prototype,"inlineStyle",void 0),m([(0,l.property)({type:Boolean})],e.prototype,"inverted",void 0),m([(0,l.property)({type:String})],e.prototype,"href",void 0),m([(0,l.property)({type:String})],e.prototype,"tag",void 0),m([(0,l.property)({type:String})],e.prototype,"target",void 0),m([(0,l.property)({type:String})],e.prototype,"size",void 0),m([(0,l.property)({type:Number,attribute:"tab-index",reflect:!0})],e.prototype,"tabIndex",null),m([(0,l.property)({type:Boolean})],e.prototype,"autofocus",void 0),m([(0,l.query)(".md-link")],e.prototype,"linkRef",void 0),e=m([(0,r.w)("md-link")],e),t.ELEMENT=e}(i||(i={}))},2022(t){t.exports=n},554(t){t.exports=s},7161(e){e.exports=t},429(t){t.exports=e},5125(t){t.exports=o},291(t){t.exports=r},318(t){t.exports=i},5314(t){t.exports=l}},p={};function m(t){var e=p[t];if(void 0!==e)return e.exports;var o=p[t]={exports:{}};return d[t](o,o.exports,m),o.exports}m.m=d,a=[],m.O=(t,e,o,i)=>{if(!e){var r=1/0;for(d=0;d<a.length;d++){for(var[e,o,i]=a[d],n=!0,s=0;s<e.length;s++)(!1&i||r>=i)&&Object.keys(m.O).every(t=>m.O[t](e[s]))?e.splice(s--,1):(n=!1,i<r&&(r=i));if(n){a.splice(d--,1);var l=o();void 0!==l&&(t=l)}}return t}i=i||0;for(var d=a.length;d>0&&a[d-1][2]>i;d--)a[d]=a[d-1];a[d]=[e,o,i]},m.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return m.d(e,{a:e}),e},m.d=(t,e)=>{for(var o in e)m.o(e,o)&&!m.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},m.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),m.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={6132:0,6724:0};m.O.j=e=>0===t[e];var e=(e,o)=>{var i,r,[n,s,l]=o,a=0;if(n.some(e=>0!==t[e])){for(i in s)m.o(s,i)&&(m.m[i]=s[i]);if(l)var d=l(m)}for(e&&e(o);a<n.length;a++)r=n[a],m.o(t,r)&&t[r]&&t[r][0](),t[r]=0;return m.O(d)},o=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))})();var c=m.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,519,476,226],()=>m(5925));return m.O(c)})());