var t,e,s={5558(t,e,s){s.d(e,{c:()=>r}),s(2245);var r,i=s(9609),o=s(4084),a=s(2927),p=s(8899),m=s(3517),l=s(9316),c=function(t,e,s,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,s,r);else for(var p=t.length-1;p>=0;p--)(i=t[p])&&(a=(o<3?i(a):o>3?i(e,s,a):i(e,s))||a);return o>3&&a&&Object.defineProperty(e,s,a),a};!function(t){let e=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,l.A]}render(){return a.html`
        <div class="md-chat-message">
          <div class="md-chat-message_avatar">
            <md-avatar
              type=${(0,m.ifDefined)(this.computedAvatarType)}
              title=${this.self?"self":this.title}
              label="${this.label}"
              src=${(0,m.ifDefined)(this.self?void 0:this.src)}
              color=${(0,m.ifDefined)(this.avatarColor)}
              size=${(0,m.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=${t=>{t.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>
      `}};c([(0,p.property)({type:String})],e.prototype,"title",void 0),c([(0,p.property)({type:String})],e.prototype,"src",void 0),c([(0,p.property)({type:String})],e.prototype,"time",void 0),c([(0,p.property)({type:String})],e.prototype,"label",void 0),c([(0,p.property)({type:String})],e.prototype,"status",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"clickableTimestamp",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"isSelected",void 0),c([(0,p.property)({type:String,reflect:!0,attribute:"self-label"})],e.prototype,"selfLabel",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"self",void 0),c([(0,p.property)({type:String,reflect:!0,attribute:"avatar-color"})],e.prototype,"avatarColor",void 0),c([(0,p.property)({type:String,reflect:!0,attribute:"avatar-type"})],e.prototype,"avatarType",void 0),c([(0,p.property)({type:Number,reflect:!0,attribute:"avatar-size"})],e.prototype,"avatarSize",void 0),e=c([(0,i.w)("md-chat-message")],e),t.ELEMENT=e}(r||(r={}))}},r={};function i(t){var e=r[t];if(void 0!==e)return e.exports;var o=r[t]={exports:{}};return s[t](o,o.exports,i),o.exports}i.m=s,t=[],i.O=(e,s,r,o)=>{if(!s){var a=1/0;for(c=0;c<t.length;c++){for(var[s,r,o]=t[c],p=!0,m=0;m<s.length;m++)(!1&o||a>=o)&&Object.keys(i.O).every(t=>i.O[t](s[m]))?s.splice(m--,1):(p=!1,o<a&&(a=o));if(p){t.splice(c--,1);var l=r();void 0!==l&&(e=l)}}return e}o=o||0;for(var c=t.length;c>0&&t[c-1][2]>o;c--)t[c]=t[c-1];t[c]=[s,r,o]},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={7684:0},i.C=t=>{var s,r,{__webpack_esm_ids__:o,__webpack_esm_modules__:a,__webpack_esm_runtime__:p}=t,m=0;for(s in a)i.o(a,s)&&(i.m[s]=a[s]);for(p&&p(i);m<o.length;m++)r=o[m],i.o(e,r)&&e[r]&&e[r][0](),e[o[m]]=0;i.O()},i.O.j=t=>0===e[t];import*as o from"../9609.js";i.C(o);import*as a from"../4084.js";i.C(a);import*as p from"../4955.js";i.C(p);import*as m from"../3517.js";i.C(m);import*as l from"../1156.js";i.C(l);import*as c from"../3305.js";i.C(c);import*as d from"../4739.js";i.C(d);import*as f from"../7154.js";i.C(f);import*as v from"../9773.js";i.C(v);import*as n from"../5983.js";i.C(n);import*as h from"../7755.js";i.C(h);import*as y from"../1821.js";i.C(y);import*as u from"../4980.js";i.C(u);import*as g from"../9500.js";i.C(g);import*as j from"../519.js";i.C(j);import*as C from"../4137.js";i.C(C);import*as b from"../8165.js";i.C(b);import*as _ from"../6325.js";i.C(_);import*as S from"../4449.js";i.C(S);import*as O from"../1392.js";i.C(O);import*as k from"../3365.js";i.C(k);import*as T from"../378.js";i.C(T);import*as $ from"../9244.js";i.C($);import*as x from"../4626.js";i.C(x);import*as w from"../9316.js";i.C(w);var D=i.O(void 0,[9609,4084,4955,3517,1156,3305,4739,7154,9773,5983,7755,1821,4980,9500,519,4137,8165,6325,4449,1392,3365,378,9244,4626,9316],()=>i(5558));const E=(D=i.O(D)).c;export{E as ChatMessage};