"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[4435,3459],{4435:function(t,e,o){o.r(e),o.d(e,{default:function(){return m}});var n=o(6252),l=o(3577);const i={class:"entity device-container"},c={class:"head"},r={class:"col-1 icon"},a={class:"col-12 label"},s=["textContent"];function u(t,e,o,u,d,p){const y=(0,n.up)("EntityIcon");return(0,n.wg)(),(0,n.iD)("div",i,[(0,n._)("div",c,[(0,n._)("div",r,[(0,n.Wm)(y,{entity:t.value,loading:t.loading,error:t.error},null,8,["entity","loading","error"])]),(0,n._)("div",a,[(0,n._)("div",{class:"name",textContent:(0,l.zw)(t.value.name)},null,8,s)])])])}var d=o(7909),p=o(3459),y={name:"Device",components:{EntityIcon:p["default"]},mixins:[d["default"]]},f=o(3744);const h=(0,f.Z)(y,[["render",u],["__scopeId","data-v-06440d28"]]);var m=h},3459:function(t,e,o){o.r(e),o.d(e,{default:function(){return y}});var n=o(6252),l=o(3577),i=o(3540);const c={key:0,src:i,class:"loading"},r={key:1,class:"fas fa-circle-exclamation error"};function a(t,e,o,i,a,s){const u=(0,n.up)("Icon");return(0,n.wg)(),(0,n.iD)("div",{class:(0,l.C_)(["entity-icon-container",{"with-color-fill":!!s.colorFill}]),style:(0,l.j5)(s.colorFillStyle)},[o.loading?((0,n.wg)(),(0,n.iD)("img",c)):o.error?((0,n.wg)(),(0,n.iD)("i",r)):((0,n.wg)(),(0,n.j4)(u,(0,l.vs)((0,n.dG)({key:2},s.computedIconNormalized)),null,16))],6)}var s=o(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=o(3744);const p=(0,d.Z)(u,[["render",a],["__scopeId","data-v-4fad24e6"]]);var y=p},3540:function(t,e,o){t.exports=o.p+"static/img/spinner.c0bee445.gif"}}]);
//# sourceMappingURL=4435.50c5de6c.js.map