import{a2 as e}from"./naive.js?v=1763625242172";import{k as t,t as n,c as a,P as c,X as o}from"./vue.js?v=1763625242172";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 c=n(t,"value");function o(n){const{"onUpdate:value":a,onChange:c,onUpdateValue:o}=t;a&&e(a,n),o&&e(o,n),c&&e(c,n)}return{checked:a((()=>c.value===t.checkedValue)),onClick:function(){c.value!==t.checkedValue?o(t.checkedValue):o(t.uncheckedValue)}}},render(){const{checked:e}=this,{t:t}=c();return o("div",{class:"inline-flex gap-2px items-center cursor-pointer",onClick:()=>{this.onClick()}},[this.showText?o("span",{class:e?"text-primary":"text-error"},[e?this.checkedLabel||t("Public.Status.Running"):this.uncheckedLabel||t("Public.Status.Stop")]):"",o("span",{class:["iconfont",e?"icon-start":"icon-stop"]},null)])}});export{u as _};
