!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(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"),require("lit/directives/until.js"));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","lit/directives/until.js"],t);else{var i="object"==typeof exports?t(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"),require("lit/directives/until.js")):t(e.lit,e["lit/decorators.js"],e["lit/directives/class-map.js"],e["lit/directives/style-map.js"],e["lit/directives/if-defined.js"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["lit/directives/until.js"]);for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(self,(e,t,i,s,r,o,a,l,p)=>(()=>{"use strict";var d,m={5558(e,t,i){i.r(t),i.d(t,{ChatMessage:()=>s}),i(2245);var s,r=i(9609),o=i(4084),a=i(7161),l=i(429),p=i(291),d=i(9316),m=function(e,t,i,s){var r,o=arguments.length,a=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};!function(e){let t=class extends a.LitElement{constructor(){super(...arguments),this.title="",this.src="",this.time="",this.label="Avatar",this.status="",this.clickableTimestamp=!1,this.isSelected=!1,this.self=!1}get computedAvatarType(){return void 0!==this.avatarType?this.avatarType:this.self?"self":void 0}get computedYouLabel(){return this.selfLabel||"You"}get isSelfType(){return void 0===this.avatarType?this.self:"self"===this.avatarType}timeStampClicked(){this.dispatchEvent(new CustomEvent("timestamp-clicked",{bubbles:!0,composed:!0}))}static get styles(){return[o.A,d.A]}render(){return a.html`
        <div class="md-chat-message">
          <div class="md-chat-message_avatar">
            <md-avatar
              type=${(0,p.ifDefined)(this.computedAvatarType)}
              title=${this.self?"self":this.title}
              label="${this.label}"
              src=${(0,p.ifDefined)(this.self?void 0:this.src)}
              color=${(0,p.ifDefined)(this.avatarColor)}
              size=${(0,p.ifDefined)(this.avatarSize)}
            ></md-avatar>
          </div>

          <div class="md-chat-message_content ${this.isSelected?"selected":""}">
            <div class="md-chat-message_heading">
              <div class="md-chat-message_title">
                <span>${this.isSelfType?this.computedYouLabel:this.title}</span>
              </div>
              ${this.clickableTimestamp?a.html`<md-link
                    class="md-chat-message_time"
                    @click=${e=>{e.preventDefault(),this.timeStampClicked()}}
                    >${this.time}</md-link
                  >`:a.html`<div class="md-chat-message_time" title="">${this.time}</div>`}
              <div class="md-chat-message_status" title="">${this.status}</div>
              <div class="md-chat-message_custom_content" title="">
                <slot name="custom-content"></slot>
              </div>
            </div>
            <div class="md-chat-message_text" title="">
              <slot name="message"></slot>
            </div>
          </div>
        </div>
      `}};m([(0,l.property)({type:String})],t.prototype,"title",void 0),m([(0,l.property)({type:String})],t.prototype,"src",void 0),m([(0,l.property)({type:String})],t.prototype,"time",void 0),m([(0,l.property)({type:String})],t.prototype,"label",void 0),m([(0,l.property)({type:String})],t.prototype,"status",void 0),m([(0,l.property)({type:Boolean})],t.prototype,"clickableTimestamp",void 0),m([(0,l.property)({type:Boolean})],t.prototype,"isSelected",void 0),m([(0,l.property)({type:String,reflect:!0,attribute:"self-label"})],t.prototype,"selfLabel",void 0),m([(0,l.property)({type:Boolean})],t.prototype,"self",void 0),m([(0,l.property)({type:String,reflect:!0,attribute:"avatar-color"})],t.prototype,"avatarColor",void 0),m([(0,l.property)({type:String,reflect:!0,attribute:"avatar-type"})],t.prototype,"avatarType",void 0),m([(0,l.property)({type:Number,reflect:!0,attribute:"avatar-size"})],t.prototype,"avatarSize",void 0),t=m([(0,r.w)("md-chat-message")],t),e.ELEMENT=t}(s||(s={}))},2022(e){e.exports=o},554(e){e.exports=a},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=i},291(e){e.exports=r},318(e){e.exports=s},9756(e){e.exports=p},5314(e){e.exports=l}},n={};function c(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return m[e](i,i.exports,c),i.exports}c.m=m,d=[],c.O=(e,t,i,s)=>{if(!t){var r=1/0;for(p=0;p<d.length;p++){for(var[t,i,s]=d[p],o=!0,a=0;a<t.length;a++)(!1&s||r>=s)&&Object.keys(c.O).every(e=>c.O[e](t[a]))?t.splice(a--,1):(o=!1,s<r&&(r=s));if(o){d.splice(p--,1);var l=i();void 0!==l&&(e=l)}}return e}s=s||0;for(var p=d.length;p>0&&d[p-1][2]>s;p--)d[p]=d[p-1];d[p]=[t,i,s]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},c.d=(e,t)=>{for(var i in t)c.o(t,i)&&!c.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={7684:0};c.O.j=t=>0===e[t];var t=(t,i)=>{var s,r,[o,a,l]=i,p=0;if(o.some(t=>0!==e[t])){for(s in a)c.o(a,s)&&(c.m[s]=a[s]);if(l)var d=l(c)}for(t&&t(i);p<o.length;p++)r=o[p],c.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return c.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var u=c.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,519,6325,4449,1392,1618,378,9244,2245,9316],()=>c(5558));return c.O(u)})());