import{a1 as e}from"./naive.js?v=1764233927359";import{k as t,P as n,W as a,t as c,c as o}from"./vue.js?v=1764233927359";const u=t({functional:!0,props:{value:{type:[String,Number,Boolean],default:void 0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},onChange:[Function,Array],showText:{type:Boolean,default:!0},checkedLabel:{type:String,default:""},uncheckedLabel:{type:String,default:""}},setup(t){const n=c(t,"value");function a(n){const{"onUpdate:value":a,onChange:c,onUpdateValue:o}=t;a&&e(a,n),o&&e(o,n),c&&e(c,n)}return{checked:o(()=>n.value===t.checkedValue),onClick:function(){n.value!==t.checkedValue?a(t.checkedValue):a(t.uncheckedValue)}}},render(){const{checked:e}=this,{t:t}=n();return a("div",{class:"inline-flex gap-2px items-center cursor-pointer",onClick:()=>{this.onClick()}},[this.showText?a("span",{class:e?"text-primary":"text-error"},[e?this.checkedLabel||t("Public.Status.Running"):this.uncheckedLabel||t("Public.Status.Stop")]):"",a("span",{class:["iconfont",e?"icon-start":"icon-stop"]},null)])}});export{u as _};
