"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[8126,3459],{3459:function(t,e,n){n.r(e),n.d(e,{default:function(){return f}});var l=n(6252),o=n(3577),i=n(3540),r={key:0,src:i,class:"loading"},c={key:1,class:"fas fa-circle-exclamation error"};function a(t,e,n,i,a,u){var s=(0,l.up)("Icon");return(0,l.wg)(),(0,l.iD)("div",{class:(0,o.C_)(["entity-icon-container",{"with-color-fill":!!u.colorFill}]),style:(0,o.j5)(u.colorFillStyle)},[n.loading?((0,l.wg)(),(0,l.iD)("img",r)):n.error?((0,l.wg)(),(0,l.iD)("i",c)):((0,l.wg)(),(0,l.j4)(s,(0,o.vs)((0,l.dG)({key:2},u.computedIconNormalized)),null,16))],6)}var u=n(4648),s=(n(7941),n(7042),n(1478)),d={name:"EntityIcon",components:{Icon:s.Z},props:{loading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},entity:{type:Object,required:!0},icon:{type:Object,default:function(){}},hasColorFill:{type:Boolean,default:!1}},data:function(){return{component:null,modalVisible:!1}},computed:{computedIcon:function(){var t,e,n=(0,u.Z)({},(null===(t=this.entity)||void 0===t||null===(e=t.meta)||void 0===e?void 0:e.icon)||{});return Object.keys(this.icon||{}).length&&(n=this.icon),(0,u.Z)({},n)},colorFill:function(){return this.hasColorFill&&this.computedIcon.color},colorFillStyle:function(){return this.colorFill&&!this.error?{background:this.colorFill}:{}},computedIconNormalized:function(){var t=(0,u.Z)({},this.computedIcon);return this.colorFill&&delete t.color,t},type:function(){var t=this.entity.type||"";return t.charAt(0).toUpperCase()+t.slice(1)}}},v=n(3744);const p=(0,v.Z)(d,[["render",a],["__scopeId","data-v-4fad24e6"]]);var f=p},8126:function(t,e,n){n.r(e),n.d(e,{default:function(){return g}});n(8309);var l=n(6252),o=n(3577),i={class:"entity link-quality-container"},r={class:"head"},c={class:"col-1 icon"},a={class:"col-s-8 col-m-9 label"},u=["textContent"],s={class:"col-s-3 col-m-2 buttons pull-right"},d=["textContent"];function v(t,e,n,v,p,f){var y=(0,l.up)("EntityIcon");return(0,l.wg)(),(0,l.iD)("div",i,[(0,l._)("div",r,[(0,l._)("div",c,[(0,l.Wm)(y,{entity:t.value,loading:t.loading,error:t.error},null,8,["entity","loading","error"])]),(0,l._)("div",a,[(0,l._)("div",{class:"name",textContent:(0,o.zw)(t.value.name)},null,8,u)]),(0,l._)("div",s,[null!=f.valuePercent?((0,l.wg)(),(0,l.iD)("span",{key:0,class:"value-percent",textContent:(0,o.zw)(f.valuePercent+"%")},null,8,d)):(0,l.kq)("",!0)])])])}n(6977);var p=n(7909),f=n(3459),y={name:"LinkQuality",components:{EntityIcon:f["default"]},mixins:[p["default"]],computed:{valuePercent:function(){var t;if(null==(null===(t=this.value)||void 0===t?void 0:t.value))return null;var e=this.value.min||0,n=this.value.max||100;return(100*this.value.value/(n-e)).toFixed(0)}}},h=n(3744);const m=(0,h.Z)(y,[["render",v],["__scopeId","data-v-4ca8847f"]]);var g=m},3540:function(t,e,n){t.exports=n.p+"static/img/spinner.c0bee445.gif"}}]);
//# sourceMappingURL=8126-legacy.ec568576.js.map