import*as t from"lit/directives/style-map.js";import*as e from"lit/directives/until.js";import*as o from"lit";import*as r from"@momentum-ui/utils/lib/getColorValue";import*as s from"lit/directives/if-defined.js";import*as i from"lit/directives/class-map.js";import*as a from"mobx";import*as n from"lit/decorators.js";import*as l from"@momentum-ui/icons/data/momentumUiIconsNames.json";var p,m,d={1156(e,o,r){var s,i;e.exports=(s={styleMap:()=>t.styleMap},i={},r.d(i,s),i)},1666(t,o,r){var s,i;t.exports=(s={until:()=>e.until},i={},r.d(i,s),i)},2927(t,e,r){var s,i;t.exports=(s={LitElement:()=>o.LitElement,css:()=>o.css,html:()=>o.html,nothing:()=>o.nothing},i={},r.d(i,s),i)},3496(t,e,o){var s,i;t.exports=(s={default:()=>r.default},i={},o.d(i,s),i)},3517(t,e,o){var r,i;t.exports=(r={ifDefined:()=>s.ifDefined},i={},o.d(i,r),i)},4955(t,e,o){var r,s;t.exports=(r={classMap:()=>i.classMap},s={},o.d(s,r),s)},4980(t,e,o){var r,s;t.exports=(r={action:()=>a.action,observable:()=>a.observable},s={},o.d(s,r),s)},7030(t,e,o){o.d(e,{A:()=>c,e:()=>d}),o(2245),o(5983),o(1821);var r=o(2900),s=o(9609),i=o(4084),a=o(2927),n=o(8899),l=o(6341),p=o(3006),m=function(t,e,o,r){var s,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a};const d=["alert","alertdialog","button","checkbox","dialog","link","option","status"];var c;!function(t){let e=class extends a.LitElement{constructor(){super(...arguments),this.attendees=[{title:"Attendee",src:null,alt:"Attendee"}],this.closeAriaLabel="close",this.onKeyDown=null,this.onSnooze=null,this.message="",this.snoozeAriaLabel="snooze",this.role="button",this.show=!1,this.src="",this.status="",this.userStyles="",this.title="",this._onSnooze=t=>{this.dispatchEvent(new CustomEvent("snooze",{composed:!0,detail:{srcEvent:t}}))},this._onClose=t=>{this.dispatchEvent(new CustomEvent("close",{composed:!0,detail:{srcEvent:t}}))},this.handleSnooze=t=>{this.onSnooze?this.onSnooze(t):this._onSnooze(t),t.stopPropagation()},this.handleClose=t=>{this._onClose(t),t.stopPropagation()},this.handleKeyDown=t=>{if(t.code===r.Uz.Escape&&this.handleClose(t),t.code===r.Uz.Enter||t.code===r.Uz.Space){switch(t.target.attributes.getNamedItem("aria-label").value){case"close":this.handleClose(t);break;case"snooze":this.handleSnooze(t)}t.preventDefault()}this.onKeyDown&&this.onKeyDown(t)}}getStyles(){return a.html`
        <style>
          ::slotted(img) {
            display: inline-block;
            vertical-align: middle;
            -ms-interpolation-mode: bicubic;
            height: auto;
            max-width: 100%;
            border-style: none;
          }
          ${this.userStyles}
        </style>
      `}static get styles(){return[i.A,p.A]}render(){const{attendees:t,message:e,onSnooze:o,role:r,src:s,status:i,title:n,closeAriaLabel:p,show:m,snoozeAriaLabel:d}=this;return a.html`
        ${this.getStyles()}
        ${m?a.html`
              <div
                aria-label="Meeting Alert"
                class=${"md-alert md-alert--meeting"}
                @keydown=${t=>this.handleKeyDown(t)}
                role=${r}
              >
                <slot name="custom-avatar"> ${t.length>=2?(0,l.o)(t):a.html` <md-avatar title=${n} label="avatar" src=${s} tabindex="-1"></md-avatar> `} </slot>
                <div class=${"md-alert__content "+(o?"":" md-alert__content--wide")}>
                  <div class="md-alert__title" title=${n}>${n}</div>
                  <div class="md-alert__status" title=${i}>${i}</div>
                  <div class="md-alert__message" title=${e}>${e}</div>
                </div>
                ${o?a.html`
                      <div class="md-alert__button">
                        <md-button
                          variant="secondary"
                          aria-label=${d}
                          circle
                          @click=${t=>{this.handleSnooze(t)}}
                          .size=${40}
                        >
                          <md-icon name="alarm-bold" size="16" iconSet="momentumDesign"></md-icon>
                        </md-button>
                      </div>
                    `:a.nothing}
                <slot name="custom-action">
                  <md-button
                    class="md-alert__button"
                    variant="ghost"
                    ariaLabel=${p}
                    circle
                    @click=${t=>{this.handleClose(t)}}
                    .size=${40}
                  >
                    <md-icon name="cancel-bold" size="16" iconSet="momentumDesign"></md-icon>
                  </md-button>
                </slot>
              </div>
            `:a.nothing}
      `}};m([(0,n.property)({type:Array})],e.prototype,"attendees",void 0),m([(0,n.property)({type:String})],e.prototype,"closeAriaLabel",void 0),m([(0,n.property)({attribute:!1})],e.prototype,"onKeyDown",void 0),m([(0,n.property)({attribute:!1})],e.prototype,"onSnooze",void 0),m([(0,n.property)({type:String})],e.prototype,"message",void 0),m([(0,n.property)({type:String})],e.prototype,"snoozeAriaLabel",void 0),m([(0,n.property)({type:String})],e.prototype,"role",void 0),m([(0,n.property)({type:Boolean})],e.prototype,"show",void 0),m([(0,n.property)({type:String})],e.prototype,"src",void 0),m([(0,n.property)({type:String})],e.prototype,"status",void 0),m([(0,n.property)({type:String})],e.prototype,"userStyles",void 0),m([(0,n.property)({type:String})],e.prototype,"title",void 0),e=m([(0,s.w)("md-meeting-alert")],e),t.ELEMENT=e}(c||(c={}))},8899(t,e,o){var r,s;t.exports=(r={property:()=>n.property,query:()=>n.query,state:()=>n.state},s={},o.d(s,r),s)},9500(t,e,o){var r,s;t.exports=(r={default:()=>l.default},s={},o.d(s,r),s)}},c={};function h(t){var e=c[t];if(void 0!==e)return e.exports;var o=c[t]={exports:{}};return d[t](o,o.exports,h),o.exports}h.m=d,p=[],h.O=(t,e,o,r)=>{if(!e){var s=1/0;for(l=0;l<p.length;l++){for(var[e,o,r]=p[l],i=!0,a=0;a<e.length;a++)(!1&r||s>=r)&&Object.keys(h.O).every(t=>h.O[t](e[a]))?e.splice(a--,1):(i=!1,r<s&&(s=r));if(i){p.splice(l--,1);var n=o();void 0!==n&&(t=n)}}return t}r=r||0;for(var l=p.length;l>0&&p[l-1][2]>r;l--)p[l]=p[l-1];p[l]=[e,o,r]},h.d=(t,e)=>{for(var o in e)h.o(e,o)&&!h.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);export{h as __webpack_require__};m={502:0,1745:0,4545:0,4908:0,4928:0,5369:0,6060:0,6920:0,8111:0,8115:0,8442:0},h.C=t=>{var e,o,{__webpack_esm_ids__:r,__webpack_esm_modules__:s,__webpack_esm_runtime__:i}=t,a=0;for(e in s)h.o(s,e)&&(h.m[e]=s[e]);for(i&&i(h);a<r.length;a++)o=r[a],h.o(m,o)&&m[o]&&m[o][0](),m[r[a]]=0;h.O()},h.O.j=t=>0===m[t];import*as v from"../9609.js";h.C(v);import*as y from"../4084.js";h.C(y);import*as u from"../3305.js";h.C(u);import*as f from"../4739.js";h.C(f);import*as b from"../7154.js";h.C(b);import*as g from"../9773.js";h.C(g);import*as _ from"../5983.js";h.C(_);import*as j from"../9488.js";h.C(j);import*as C from"../1821.js";h.C(C);import*as S from"../519.js";h.C(S);import*as z from"../6325.js";h.C(z);import*as $ from"../4449.js";h.C($);import*as w from"../1392.js";h.C(w);import*as x from"../1618.js";h.C(x);import*as A from"../4621.js";h.C(A);import*as E from"../9244.js";h.C(E);import*as O from"../4626.js";h.C(O);import*as D from"../1816.js";h.C(D);var k=h.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,519,6325,4449,1392,1618,4621,9244,4626,1816],()=>h(7030));const L=(k=h.O(k)).A,M=k.e;export{L as MeetingAlert,M as MeetingAlertRole};