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