"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[1399,3459],{3459:function(t,n,e){e.r(n),e.d(n,{default:function(){return f}});var o=e(6252),l=e(3577),i=e(3540),r={key:0,src:i,class:"loading"},c={key:1,class:"fas fa-circle-exclamation error"};function a(t,n,e,i,a,u){var s=(0,o.up)("Icon");return(0,o.wg)(),(0,o.iD)("div",{class:(0,l.C_)(["entity-icon-container",{"with-color-fill":!!u.colorFill}]),style:(0,l.j5)(u.colorFillStyle)},[e.loading?((0,o.wg)(),(0,o.iD)("img",r)):e.error?((0,o.wg)(),(0,o.iD)("i",c)):((0,o.wg)(),(0,o.j4)(s,(0,l.vs)((0,o.dG)({key:2},u.computedIconNormalized)),null,16))],6)}var u=e(4648),s=(e(7941),e(7042),e(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,n,e=(0,u.Z)({},(null===(t=this.entity)||void 0===t||null===(n=t.meta)||void 0===n?void 0:n.icon)||{});return Object.keys(this.icon||{}).length&&(e=this.icon),(0,u.Z)({},e)},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)}}},p=e(3744);const v=(0,p.Z)(d,[["render",a],["__scopeId","data-v-4fad24e6"]]);var f=v},1399:function(t,n,e){e.r(n),e.d(n,{default:function(){return k}});e(8309);var o=e(6252),l=e(3577),i={class:"entity sensor-container"},r={class:"head"},c={class:"col-1 icon"},a={class:"col-s-8 col-m-9 label"},u=["textContent"],s={key:0,class:"col-s-3 col-m-2 pull-right"},d=["textContent"],p=["textContent"];function v(t,n,e,v,f,y){var m=(0,o.up)("EntityIcon");return(0,o.wg)(),(0,o.iD)("div",i,[(0,o._)("div",r,[(0,o._)("div",c,[(0,o.Wm)(m,{entity:t.value,loading:t.loading,error:t.error},null,8,["entity","loading","error"])]),(0,o._)("div",a,[(0,o._)("div",{class:"name",textContent:(0,l.zw)(t.value.name)},null,8,u)]),null!=t.value.value?((0,o.wg)(),(0,o.iD)("div",s,[null!=t.value.unit?((0,o.wg)(),(0,o.iD)("span",{key:0,class:"unit",textContent:(0,l.zw)(t.value.unit)},null,8,d)):(0,o.kq)("",!0),(0,o._)("span",{class:"value",textContent:(0,l.zw)(t.value.value)},null,8,p)])):(0,o.kq)("",!0)])])}var f=e(7909),y=e(3459),m={name:"Sensor",components:{EntityIcon:y["default"]},mixins:[f["default"]]},h=e(3744);const g=(0,h.Z)(m,[["render",v],["__scopeId","data-v-8b992454"]]);var k=g},3540:function(t,n,e){t.exports=e.p+"static/img/spinner.c0bee445.gif"}}]);
//# sourceMappingURL=1399-legacy.7e768542.js.map