var t,e,o={5925(t,e,o){o.d(e,{F:()=>r}),o(1821),o(5095);var r,i=o(9609),n=o(4084),s=o(2927),l=o(8899),a=o(4955),d=o(226),p=function(t,e,o,r){var i,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(s=(n<3?i(s):n>3?i(e,o,s):i(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,i.w)("md-alert")],e),t.ELEMENT=e}(r||(r={}))},5095(t,e,o){var r,i=o(9609),n=o(4084),s=o(2927),l=o(8899),a=o(4955),d=o(3517),p=o(476),m=function(t,e,o,r){var i,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(s=(n<3?i(s):n>3?i(e,o,s):i(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,i.w)("md-link")],e),t.ELEMENT=e}(r||(r={}))}},r={};function i(t){var e=r[t];if(void 0!==e)return e.exports;var n=r[t]={exports:{}};return o[t](n,n.exports,i),n.exports}i.m=o,t=[],i.O=(e,o,r,n)=>{if(!o){var s=1/0;for(p=0;p<t.length;p++){for(var[o,r,n]=t[p],l=!0,a=0;a<o.length;a++)(!1&n||s>=n)&&Object.keys(i.O).every(t=>i.O[t](o[a]))?o.splice(a--,1):(l=!1,n<s&&(s=n));if(l){t.splice(p--,1);var d=r();void 0!==d&&(e=d)}}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]=[o,r,n]},i.d=(t,e)=>{for(var o in e)i.o(e,o)&&!i.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);export{i as __webpack_require__};e={6132:0,6724:0},i.C=t=>{var o,r,{__webpack_esm_ids__:n,__webpack_esm_modules__:s,__webpack_esm_runtime__:l}=t,a=0;for(o in s)i.o(s,o)&&(i.m[o]=s[o]);for(l&&l(i);a<n.length;a++)r=n[a],i.o(e,r)&&e[r]&&e[r][0](),e[n[a]]=0;i.O()},i.O.j=t=>0===e[t];import*as n from"../9609.js";i.C(n);import*as s from"../4084.js";i.C(s);import*as l from"../4955.js";i.C(l);import*as a from"../3517.js";i.C(a);import*as d from"../1156.js";i.C(d);import*as p from"../3305.js";i.C(p);import*as m from"../4739.js";i.C(m);import*as c from"../7154.js";i.C(c);import*as h from"../9773.js";i.C(h);import*as y from"../5983.js";i.C(y);import*as u from"../7755.js";i.C(u);import*as v from"../1821.js";i.C(v);import*as f from"../4980.js";i.C(f);import*as b from"../9500.js";i.C(b);import*as g from"../519.js";i.C(g);import*as $ from"../4137.js";i.C($);import*as _ from"../8165.js";i.C(_);import*as C from"../476.js";i.C(C);import*as k from"../226.js";i.C(k);var w=i.O(void 0,[9609,4084,4955,3517,1156,3305,4739,7154,9773,5983,7755,1821,4980,9500,519,4137,8165,476,226],()=>i(5925));const S=(w=i.O(w)).F;export{S as Alert};