define(["exports","./../../emby-apiclient/events.js","./../../common/input/api.js","./../../shortcuts.js","./../emby-progressring/emby-progressring.js"],function(_exports,_events,_api,_shortcuts,_embyProgressring){function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function(){return!!t})()}function onRefreshProgress(e,apiClient,info){var item;this.itemId||(item=_shortcuts.default.getItemFromChildNode(this))&&(this.itemId=item.Id),info.ItemId===this.itemId&&((item=parseFloat(info.Progress))&&item<100?this.classList.remove("hide"):this.classList.add("hide"),this.setProgress(item))}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;var EmbyItemRefreshIndicator=function(_EmbyProgressRing){function EmbyItemRefreshIndicator(){babelHelpers.classCallCheck(this,EmbyItemRefreshIndicator),t=this,o=EmbyItemRefreshIndicator,o=babelHelpers.getPrototypeOf(o);var o,e,t=o=babelHelpers.possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],babelHelpers.getPrototypeOf(t).constructor):o.apply(t,e));return function(){this.hasInit||(this.hasInit=!0)}.call(t),babelHelpers.possibleConstructorReturn(o,t)}return babelHelpers.inherits(EmbyItemRefreshIndicator,_EmbyProgressRing),babelHelpers.createClass(EmbyItemRefreshIndicator,[{key:"connectedCallback",value:function(){var instance,name,handler;_embyProgressring.default.prototype.connectedCallback.call(this),name="RefreshProgress",handler=(handler=onRefreshProgress).bind(instance=this),_events.default.on(_api.default,name,handler),instance[name]=handler}},{key:"disconnectedCallback",value:function(){var instance,name,handler;_embyProgressring.default.prototype.disconnectedCallback.call(this),(handler=(instance=this)[name="RefreshProgress"])&&(_events.default.off(_api.default,name,handler),instance[name]=null),this.itemId=null}}])}(_embyProgressring.default);customElements.define("emby-itemrefreshindicator",EmbyItemRefreshIndicator,{extends:"div"}),_exports.default=_embyProgressring.default});