platypush/platypush/backend/http/webapp/dist/static/js/8621.9250e91f.js

2 lines
1.9 KiB
JavaScript

"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[8621],{7514:function(e,n,t){t.d(n,{Z:function(){return f}});var a=t(6252),l=t(3577),i=t(9963);const s=e=>((0,a.dD)("data-v-eff375b6"),e=e(),(0,a.Cn)(),e),o=["checked","id"],d=s((()=>(0,a._)("div",{class:"switch"},[(0,a._)("div",{class:"dot"})],-1))),u={class:"label"};function c(e,n,t,s,c,r){return(0,a.wg)(),(0,a.iD)("div",{class:(0,l.C_)(["power-switch",{disabled:t.disabled}]),onClick:n[0]||(n[0]=(0,i.iM)(((...e)=>r.onInput&&r.onInput(...e)),["stop"]))},[(0,a._)("input",{type:"checkbox",checked:t.value,id:t.id},null,8,o),(0,a._)("label",null,[d,(0,a._)("span",u,[(0,a.WI)(e.$slots,"default",{},void 0,!0)])])],2)}var r={name:"ToggleSwitch",emits:["input"],props:{id:{type:String},value:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},methods:{onInput(e){if(this.disabled)return!1;this.$emit("input",e)}}},v=t(3744);const p=(0,v.Z)(r,[["render",c],["__scopeId","data-v-eff375b6"]]);var f=p},8621:function(e,n,t){t.r(n),t.d(n,{default:function(){return g}});var a=t(6252),l=t(3577);const i={class:"entity sensor-container"},s={class:"head"},o={class:"icon"},d={class:"label"},u=["textContent"],c={key:0,class:"value-container"};function r(e,n,t,r,v,p){const f=(0,a.up)("EntityIcon"),h=(0,a.up)("ToggleSwitch");return(0,a.wg)(),(0,a.iD)("div",i,[(0,a._)("div",s,[(0,a._)("div",o,[(0,a.Wm)(f,{entity:e.value,loading:e.loading,error:e.error},null,8,["entity","loading","error"])]),(0,a._)("div",d,[(0,a._)("div",{class:"name",textContent:(0,l.zw)(e.value.name)},null,8,u)]),null!=e.value.value?((0,a.wg)(),(0,a.iD)("div",c,[(0,a.Wm)(h,{value:e.value.value,disabled:!0},null,8,["value"])])):(0,a.kq)("",!0)])])}var v=t(847),p=t(4967),f=t(7514),h={name:"BinarySensor",components:{EntityIcon:p["default"],ToggleSwitch:f.Z},mixins:[v["default"]]},b=t(3744);const _=(0,b.Z)(h,[["render",r],["__scopeId","data-v-8baaebb4"]]);var g=_}}]);
//# sourceMappingURL=8621.9250e91f.js.map