var t,e,i={7901(t,e,i){var o,s=i(9609),r=i(4084),a=i(2927),l=i(8899),p=i(4955),n=i(3517),d=i(4958),h=i(3543),m=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends a.LitElement{constructor(){super(...arguments),this.ariaLabel="",this.color="",this.bgColor="",this.textColor="",this.height="",this.width="",this.outlined=!1,this.compact=!1,this.circle=!1,this.circleSize=d.zj[40],this.small=!1,this.split=!1,this.disabled=!1,this.tabIndexing="",this.ariaHiddenSplits="",this.renderBgColor=()=>this.bgColor?`background-color: ${this.bgColor};`:a.nothing,this.renderTextColor=()=>this.textColor?`color: ${this.textColor};`:a.nothing,this.renderHeight=()=>this.height?`height: ${this.height};`:a.nothing,this.renderWidth=()=>this.width?`width: ${this.width};`:a.nothing,this.getStyles=()=>this.bgColor||this.textColor||this.height||this.width?a.html`
          <style>
            :host .md-badge {
              ${this.renderBgColor()};
              ${this.renderTextColor()};
              ${this.renderHeight()};
              ${this.renderWidth()};
            }
          </style>
        `:a.nothing}static get styles(){return[r.A,h.A]}get computedAriaHiddenSplits(){return"true"===this.ariaHiddenSplits||"false"!==this.ariaHiddenSplits&&void 0}get computedTabIndex(){const t=parseInt(this.tabIndexing);return isNaN(t)?void 0:t}render(){const t={"md-badge--circle":this.circle,[`md-badge--circle-${this.circleSize}`]:this.circle,"md-badge--split":this.split,"md-badge--compact":this.compact,"md-badge--small":this.small||24===this.size,[`md-badge--size-${this.size}`]:!!this.size&&24!==this.size,"md-badge--outline":this.outlined,"md-badge--disabled":this.disabled,[`md-badge--${this.color}`]:!this.disabled&&this.color};return a.html`
        ${this.getStyles()}
        <span
          tabindex=${(0,n.ifDefined)(this.computedTabIndex)}
          part="badge"
          class="md-badge ${(0,p.classMap)(t)}"
          aria-label=${this.ariaLabel}
        >
          ${this.split?(()=>a.html`
          <slot
            aria-hidden=${(0,n.ifDefined)(this.computedAriaHiddenSplits)}
            name="split-left"
            class="split split-left"
          ></slot>
          <span aria-hidden="true" class="split-separator"> | </span>
          <slot
            aria-hidden=${(0,n.ifDefined)(this.computedAriaHiddenSplits)}
            name="split-right"
            class="split split-right"
          ></slot>
        `)():a.nothing}
          <slot></slot>
        </span>
      `}};m([(0,l.property)({type:String})],e.prototype,"ariaLabel",void 0),m([(0,l.property)({type:String})],e.prototype,"color",void 0),m([(0,l.property)({type:String})],e.prototype,"bgColor",void 0),m([(0,l.property)({type:String})],e.prototype,"textColor",void 0),m([(0,l.property)({type:String})],e.prototype,"height",void 0),m([(0,l.property)({type:String})],e.prototype,"width",void 0),m([(0,l.property)({type:Boolean})],e.prototype,"outlined",void 0),m([(0,l.property)({type:Boolean})],e.prototype,"compact",void 0),m([(0,l.property)({type:Boolean})],e.prototype,"circle",void 0),m([(0,l.property)({type:Number,attribute:"circle-size"})],e.prototype,"circleSize",void 0),m([(0,l.property)({type:Number})],e.prototype,"size",void 0),m([(0,l.property)({type:Boolean})],e.prototype,"small",void 0),m([(0,l.property)({type:Boolean})],e.prototype,"split",void 0),m([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),m([(0,l.property)({type:String})],e.prototype,"tabIndexing",void 0),m([(0,l.property)({type:String})],e.prototype,"ariaHiddenSplits",void 0),e=m([(0,s.w)("md-badge")],e),t.ELEMENT=e}(o||(o={}))},1479(t,e,i){i.d(e,{L:()=>o}),i(2245),i(7901),i(1821);var o,s=i(9609),r=i(4084),a=i(2927),l=i(8899),p=i(4955),n=i(3517),d=i(9244),h=i(5076),m=i(8634),c=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends a.LitElement{constructor(){super(...arguments),this.mediaType=d.r.TELEPHONY,this.status="",this.popovertitle="",this.queue="",this.queueTimeLabel="",this.accepted=!1,this.displayOnlyTitle=!1,this.quantity=0,this.lastmessage="",this.selected=!1,this.disabled=!1,this.customAriaLabel="",this.iconSrc="",this.tabIndexForContainer="0",this.isRestyle=!1,this.displayTitle="",this.titleValue="",this.itemTitleValue="",this.additionEmptyMargin=!1}get title(){return this.displayTitle}set title(t){this.titleValue=t,this.updateTitle()}get itemTitle(){return this.displayTitle}set itemTitle(t){this.itemTitleValue=t,this.updateTitle()}updateTitle(){this.itemTitleValue?this.displayTitle=this.itemTitleValue:this.displayTitle=this.titleValue}handleClick(t){this.dispatchEvent(new CustomEvent("taskitem-click",{composed:!0,bubbles:!0,detail:{srcEvent:t}})),this.blur()}handleKeyDown(t){this.dispatchEvent(new CustomEvent("taskitem-keydown",{detail:{key:t.code},bubbles:!0,composed:!0}))}getAriaLabel(){var t,e,i,o;if(this.customAriaLabel)return this.customAriaLabel;let s=this.queue;if(!s){const i=this.querySelector('[slot="queue"]');if(i){s=null!==(e=null===(t=i.textContent)||void 0===t?void 0:t.trim())&&void 0!==e?e:i.innerText.trim();const o=/(?:([01]?\d|2[0-3]):)?([0-5]?\d):([0-5]?\d)/.exec(s);if(o){const[,t=0,e,i]=o.map(Number);(new Date).setHours(t,e,i),s=s.replace(/(?:([01]?\d|2[0-3]):)?([0-5]?\d):([0-5]?\d)/,`${t?t+" hours ":""}${e} minutes ${i} seconds`)}}}const r=this.querySelector('[slot="queue-time"]');let a=this.queueTimeLabel;return r&&(a+=`${null!==(o=null===(i=r.textContent)||void 0===i?void 0:i.trim())&&void 0!==o?o:r.innerText.trim()}`),`${this.mediaType} ${this.status} ${this.popovertitle} ${this.itemTitle} ${s} ${a} ${this.quantity?this.quantity:""} ${this.lastmessage}`}static get styles(){return[r.A,m.A]}get sanitizedTabIndexForContainer(){var t;return null!==(t=parseInt(this.tabIndexForContainer))&&void 0!==t?t:0}handleAdditionSlotChange(){var t;const e=(null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".md-taskitem__addition")).getBoundingClientRect();this.additionEmptyMargin=0===e.width&&0===e.height}render(){return a.html`
        <div
          part="task-item-container"
          class="md-taskitem ${(0,p.classMap)({selected:this.selected})}"
          tabindex=${this.sanitizedTabIndexForContainer}
          @click=${t=>this.handleClick(t)}
          @keydown=${t=>this.handleKeyDown(t)}
          aria-label=${this.getAriaLabel()}
          aria-disabled=${(0,n.ifDefined)(this.disabled||void 0)}
        >
          <div class="md-taskitem__mediatype">
            ${(0,h.i0)(this.isRestyle,this.mediaType,this.selected,this.status,this.iconSrc)}
            ${this.status&&!this.isRestyle?a.html` <span class=${`md-taskitem__status ${this.status}`}> ${(0,h.LG)(this.status)} </span> `:a.nothing}
          </div>
          <div class="md-taskitem__content" part="task-item-content">
            ${this.popovertitle?a.html`
                  <span class="md-taskitem__content_popover_title"
                    ><md-tooltip placement="bottom" slot-to-tooltip>${this.popovertitle}</md-tooltip></span
                  >
                `:a.nothing}
            ${this.itemTitle?a.html`
                  <span
                    class="md-taskitem__content_title ${(0,p.classMap)({mainTitle:!this.popovertitle,"display-only-title":this.displayOnlyTitle})}"
                    ><md-tooltip placement="bottom" slot-to-tooltip>${this.itemTitle}</md-tooltip></span
                  >
                `:a.html`
                  <span class="md-taskitem__content_popover_title popover-item-title"><slot name="title"></slot></span>
                `}
            <div class="md-taskitem__content_inner">
              ${this.displayOnlyTitle?a.nothing:a.html`
                    <span class="md-taskitem__content_queue">
                      <md-tooltip placement="bottom" slot-to-tooltip>
                        ${this.queue.length>0?this.queue:a.html` <slot name="queue"></slot> `}
                      </md-tooltip>
                    </span>
                  `}
              ${this.queueTimeLabel.length>0||this.querySelector('[slot="queue-time"]')?a.html`
                    <span class="md-taskitem__content_queue_time">
                      <div class="md-taskitem__content_queue_time_dot"></div>
                      ${this.queueTimeLabel}
                      <slot name="queue-time"></slot>
                    </span>
                  `:a.nothing}
            </div>
            ${this.lastmessage?a.html`
                  <span class="md-taskitem__content_chat">
                    <span class="new-chat_massages">
                      <md-tooltip placement="bottom" slot-to-tooltip> ${this.lastmessage} </md-tooltip></span
                    >
                  </span>
                `:a.nothing}
            ${this.lastmessage?a.nothing:a.html` <slot name="lastmessage"></slot> `}
          </div>
          <div class="md-taskitem__addition ${(0,p.classMap)({empty_addition:this.additionEmptyMargin})}">
            <slot @slotchange=${this.handleAdditionSlotChange}></slot>
            ${(0,h.Um)(this.quantity,this.isRestyle,this)}
          </div>
        </div>
      `}};c([(0,l.property)({type:String})],e.prototype,"mediaType",void 0),c([(0,l.property)({type:String})],e.prototype,"status",void 0),c([(0,l.property)({type:String})],e.prototype,"popovertitle",void 0),c([(0,l.property)({type:String})],e.prototype,"queue",void 0),c([(0,l.property)({type:String,attribute:"queue-time-label"})],e.prototype,"queueTimeLabel",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"accepted",void 0),c([(0,l.property)({type:Boolean,attribute:"display-only-title"})],e.prototype,"displayOnlyTitle",void 0),c([(0,l.property)({type:Number})],e.prototype,"quantity",void 0),c([(0,l.property)({type:String})],e.prototype,"lastmessage",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"selected",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),c([(0,l.property)({type:String})],e.prototype,"customAriaLabel",void 0),c([(0,l.property)({type:String})],e.prototype,"iconSrc",void 0),c([(0,l.property)({type:String})],e.prototype,"tabIndexForContainer",void 0),c([(0,l.property)({type:Boolean,attribute:"is-restyle"})],e.prototype,"isRestyle",void 0),c([(0,l.property)({type:String,reflect:!0})],e.prototype,"title",null),c([(0,l.property)({type:String,reflect:!0,attribute:"item-title"})],e.prototype,"itemTitle",null),c([(0,l.state)()],e.prototype,"additionEmptyMargin",void 0),e=c([(0,s.w)("md-task-item")],e),t.ELEMENT=e}(o||(o={}))}},o={};function s(t){var e=o[t];if(void 0!==e)return e.exports;var r=o[t]={exports:{}};return i[t](r,r.exports,s),r.exports}s.m=i,t=[],s.O=(e,i,o,r)=>{if(!i){var a=1/0;for(d=0;d<t.length;d++){for(var[i,o,r]=t[d],l=!0,p=0;p<i.length;p++)(!1&r||a>=r)&&Object.keys(s.O).every(t=>s.O[t](i[p]))?i.splice(p--,1):(l=!1,r<a&&(a=r));if(l){t.splice(d--,1);var n=o();void 0!==n&&(e=n)}}return e}r=r||0;for(var d=t.length;d>0&&t[d-1][2]>r;d--)t[d]=t[d-1];t[d]=[i,o,r]},s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);export{s as __webpack_require__};e={7901:0,8339:0},s.C=t=>{var i,o,{__webpack_esm_ids__:r,__webpack_esm_modules__:a,__webpack_esm_runtime__:l}=t,p=0;for(i in a)s.o(a,i)&&(s.m[i]=a[i]);for(l&&l(s);p<r.length;p++)o=r[p],s.o(e,o)&&e[o]&&e[o][0](),e[r[p]]=0;s.O()},s.O.j=t=>0===e[t];import*as r from"../9609.js";s.C(r);import*as a from"../4084.js";s.C(a);import*as l from"../4955.js";s.C(l);import*as p from"../3517.js";s.C(p);import*as n from"../1156.js";s.C(n);import*as d from"../3305.js";s.C(d);import*as h from"../4739.js";s.C(h);import*as m from"../7154.js";s.C(m);import*as c from"../9773.js";s.C(c);import*as y from"../5983.js";s.C(y);import*as u from"../7755.js";s.C(u);import*as g from"../1821.js";s.C(g);import*as v from"../4980.js";s.C(v);import*as b from"../9500.js";s.C(b);import*as f from"../519.js";s.C(f);import*as _ from"../4137.js";s.C(_);import*as $ from"../8165.js";s.C($);import*as C from"../6325.js";s.C(C);import*as T from"../4449.js";s.C(T);import*as S from"../1392.js";s.C(S);import*as j from"../3365.js";s.C(j);import*as k from"../378.js";s.C(k);import*as x from"../4626.js";s.C(x);import*as q from"../3543.js";s.C(q);import*as w from"../861.js";s.C(w);import*as L from"../4958.js";s.C(L);var O=s.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,4626,3543,861,4958],()=>s(1479));const E=(O=s.O(O)).L;export{E as TaskItem};