import{g as ae,p as te,h as B,B as v,a7 as le,t as D,ad as se,aS as oe,c as a,X as I,b as i,n as F,a as A,F as E,k as ne,H as ie,I as re,K as k,s as ue,w as r,o as de,x as w,y as _,z as b,$ as y}from"./index-DPl16C00.js";import{b as R,V as z,f as N}from"./VCard-CJTiHjO-.js";import{K as ce,a as fe,p as me,L as ve,V as Ve,N as ge}from"./index-w-dkzpPh.js";import{a as Ce,V as M,m as he}from"./VInput-qFshDEqa.js";import{V as T,m as ke}from"./VSelectionControl-MTkDIXZh.js";import{f as we,V as _e}from"./forwardRefs-BQ8_JL2J.js";import"./VImg-B-97Yzkt.js";const be=te({indeterminate:Boolean,inset:Boolean,flat:Boolean,loading:{type:[Boolean,String],default:!1},...he(),...ke()},"VSwitch"),ye=ae()({name:"VSwitch",inheritAttrs:!1,props:be(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,d){let{attrs:o,slots:t}=d;const l=B(e,"indeterminate"),n=B(e,"modelValue"),{loaderClasses:L}=ce(e),{isFocused:U,focus:$,blur:K}=Ce(e),p=v(),S=v(),x=le&&window.matchMedia("(forced-colors: active)").matches,H=D(()=>typeof e.loading=="string"&&e.loading!==""?e.loading:e.color),O=se(),W=D(()=>e.id||`switch-${O}`);function X(){l.value&&(l.value=!1)}function j(c){var f,m;c.stopPropagation(),c.preventDefault(),(m=(f=p.value)==null?void 0:f.input)==null||m.click()}return fe(()=>{const[c,f]=oe(o),m=M.filterProps(e),q=T.filterProps(e);return a(M,I({ref:S,class:["v-switch",{"v-switch--flat":e.flat},{"v-switch--inset":e.inset},{"v-switch--indeterminate":l.value},L.value,e.class]},c,m,{modelValue:n.value,"onUpdate:modelValue":V=>n.value=V,id:W.value,focused:U.value,style:e.style}),{...t,default:V=>{let{id:G,messagesId:J,isDisabled:Q,isReadonly:Y,isValid:P}=V;const g={model:n,isValid:P};return a(T,I({ref:p},q,{modelValue:n.value,"onUpdate:modelValue":[u=>n.value=u,X],id:G.value,"aria-describedby":J.value,type:"checkbox","aria-checked":l.value?"mixed":void 0,disabled:Q.value,readonly:Y.value,onFocus:$,onBlur:K},f),{...t,default:u=>{let{backgroundColorClasses:C,backgroundColorStyles:s}=u;return i("div",{class:A(["v-switch__track",x?void 0:C.value]),style:F(s.value),onClick:j},[t["track-true"]&&i("div",{key:"prepend",class:"v-switch__track-true"},[t["track-true"](g)]),t["track-false"]&&i("div",{key:"append",class:"v-switch__track-false"},[t["track-false"](g)])])},input:u=>{let{inputNode:C,icon:s,backgroundColorClasses:Z,backgroundColorStyles:ee}=u;return i(E,null,[C,i("div",{class:A(["v-switch__thumb",{"v-switch__thumb--filled":s||e.loading},e.inset||x?void 0:Z.value]),style:F(e.inset?void 0:ee.value)},[t.thumb?a(me,{defaults:{VIcon:{icon:s,size:"x-small"}}},{default:()=>[t.thumb({...g,icon:s})]}):a(ve,null,{default:()=>[e.loading?a(ge,{name:"v-switch",active:!0,color:P.value===!1?void 0:H.value},{default:h=>t.loader?t.loader(h):a(_e,{active:h.isActive,color:h.color,indeterminate:!0,size:"16",width:"2"},null)}):s&&a(Ve,{key:String(s),icon:s,size:"x-small"},null)]})])])}})}})}),we({},S)}}),pe={class:"my-2"},Ae=ne({__name:"CoreConfigs",setup(e){const d=v(""),o=v(!1);return ie(o,()=>{k.setDeviceControlDisabled(o.value)}),re(async()=>{d.value=await k.getVersion(),o.value=(await k.getDeviceControlDisabled()).disable_device_control}),(t,l)=>(de(),ue(E,null,[a(R,{class:"elevation-2 ma-4 max-w-sm"},{default:r(()=>[a(z,null,{default:r(()=>[w(_(b(y)("settings.device_control")),1)]),_:1}),a(N,null,{default:r(()=>[a(ye,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=n=>o.value=n),label:b(y)("settings.disableDeviceControl")},null,8,["modelValue","label"])]),_:1})]),_:1}),a(R,{class:"elevation-2 ma-4 max-w-sm"},{default:r(()=>[a(z,null,{default:r(()=>[w(_(b(y)("settings.about")),1)]),_:1}),a(N,null,{default:r(()=>[i("div",pe,[l[1]||(l[1]=w(" Energy Assistant Copyright © 2025 by Paul Frank ",-1)),i("p",null,"Version: "+_(d.value),1)])]),_:1})]),_:1})],64))}});export{Ae as default};
