(()=>{function t(a){var n,s,e=this,c=new a([{min:0,max:10,icon:"battery-0",class:"statusNok"},{min:10,max:30,icon:"battery-1",class:"statusAlert"},{min:30,max:60,icon:"battery-2",class:"statusOk"},{min:60,max:90,icon:"battery-3",class:"statusOk"},{min:90,max:100,icon:"battery-4",class:"statusOk"}]);function i(){var t=n&&(s||c).find(n);e.$icon=t&&t.icon||"battery-0",e.$class=t&&t.class||"statusNok"}_.assign(e,{$onInit:function(){n=e.value||0,i()},$onChanges:function(t){t.value&&(n=t.value.currentValue);t.ranges&&(t=t.ranges.currentValue,s=_.isArray(t)?new a(t):t);i()}})}t.$inject=["RangeSet"],angular.module("c8y.ui").component("c8yBatteryLevel",{templateUrl:":::PLUGIN_PATH:::/ui/components/battery/battery.html",bindings:{value:"<",ranges:"<?"},controller:t})})();