/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
import{e as f}from"./LDDAJOTV.js";import{h as b}from"./JCTU3MST.js";import{d as h}from"./IJQZON2Z.js";import{N as m,O as u,P as g,R as p,U as d,a as l,b as c}from"./IXZEUVT2.js";var n={actionMenu:"action-menu",actionGroup:"action-group",filterNoResults:"filter-no-results",item:"item",itemActive:"active",itemContentBottom:"content-bottom",itemMessage:"message",itemActionIcon:"action-icon",itemActionImage:"action-image",itemTemporaryIcon:"temporary-icon",itemTableIcon:"table-icon",itemCatalogIcon:"catalog-icon",statusIndicator:"status-indicator",publishing:"publishing",updating:"updating",connectionStatus:"connection-status",connectionStatusConnected:"connection-status--connected",visibleToggle:"visible-toggle",visibleIcon:"visible-icon"},v=l`:host{margin-inline:var(--calcite-space-sm)}.status-indicator{visibility:hidden}.publishing{visibility:visible;color:var(--calcite-color-text-2);transform-origin:var(--calcite-list-item-icon-center) var(--calcite-list-item-icon-center);animation:2s infinite arcgis-layer-list__publishing-anim}.updating{visibility:visible;animation:2s infinite arcgis-layer-list__updating-anim}.connection-status{visibility:visible;color:var(--calcite-color-status-warning);width:var(--calcite-spacing-xl);height:var(--calcite-spacing-xl)}.connection-status--connected{color:var(--calcite-color-status-success)}@keyframes arcgis-layer-list__updating-anim{0%,40%{color:transparent}50%,80%{color:var(--calcite-color-brand)}to{color:transparent}}@keyframes arcgis-layer-list__publishing-anim{0%,20%{transform:rotate(45deg)}80%,to{transform:rotate(135deg)}}`,r=class extends u{constructor(){super(...arguments),this.autoDestroyDisabled=!1,this.arcgisPropertyChange=b()("item","parent")}static{this.properties={_iconEl:16,item:0,parent:0,messages:0,autoDestroyDisabled:5}}static{this.styles=[v]}async destroy(){await this.manager.destroy()}_setIconEl(i){this._iconEl=i}getTooltipText(i,o,s,t){let e=a=>typeof a=="string"?a:"";if(i)return e(t?.publishing);if(o)return e(t?.updating);switch(s){case"connected":return e(t?.connected);case"paused":return e(t?.paused);default:return e(t?.disconnected)}}render(){if(!this.item)return null;let{publishing:i}=this.item,o="updating"in this.item&&this.item.updating&&!this.parent,s="connectionStatus"in this.item?this.item.connectionStatus:void 0,t=!!s,e=i||o||t?f({connectionStatus:s,publishing:i}):"blank",{messages:a}=this,y=this.getTooltipText(i,o,s,a);return c`<calcite-icon class=${g(h(n.statusIndicator,{[n.publishing]:i},"updating"in n&&{[n.updating]:o},"connectionStatus"in n&&{[n.connectionStatus]:t},"connectionStatusConnected"in n&&{[n.connectionStatusConnected]:t&&s==="connected"}))} title=${a?.connectionStatus??p} .icon=${e} scale=s ${m(this._setIconEl)}></calcite-icon>${this._iconEl?c`<calcite-tooltip placement=top .referenceElement=${this._iconEl}>${y}</calcite-tooltip>`:null}`}};d("arcgis-layer-list-item-indicator",r);export{n as a,r as b};
