import{c as k,x as P,y as C,d as n,e as b,j as h,t as r,u as l,k as y,z as V,w as M,A as B,m as w,B as D,o as u}from"./createLucideIcon-mjjtyxlm.js";/**
 * @license lucide-vue-next v1.0.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const A=k("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);/**
 * @license lucide-vue-next v1.0.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const F=k("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),j=["for"],z={key:0,class:"mt-0 form-text"},I=["id","true-value","false-value"],N={key:0,class:"form-text"},L={__name:"Checkbox",props:D({class:{type:String,default:""},desc:{type:String,default:null},id:{type:String,required:!0},label:{type:String,default:null},localePrefix:{type:String,default:"missing-prefix"},inverseValues:{type:Boolean,default:!1},default:{type:void 0,default:null}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(c){const o=P(c,"modelValue"),x=C(),s=c,_=(()=>{let e=s.class.split(" ");return e.includes("form-check")||e.push("form-check"),e.join(" ")})(),d=e=>{if(e===!0||e===!1)return{possibleValues:[!0,!1],value:e};if(e===1||e===0)return{possibleValues:[1,0],value:e};const a=[["true","false"],["1","0"],["enabled","disabled"],["enable","disable"],["yes","no"],["on","off"]];e=`${e}`.toLowerCase().trim();for(const t of a)if(e===t[0]||e===t[1])return{possibleValues:t,value:e};return null},i=(()=>{const e=(()=>{const m=d(o.value);return m!==null?m.possibleValues:(console.error(`Checkbox value ${o.value} did not match any acceptable pattern!`),["true","false"])})(),a=s.inverseValues?1:0,t=s.inverseValues?0:1;return{truthy:e[a],falsy:e[t]}})(),f=(()=>{const e=d(s.default);return e!==null?e.value===e.possibleValues[0]:null})(),v=s.label??`${s.localePrefix}.${s.id}`,$=s.desc??`${s.localePrefix}.${s.id}_desc`,p=s.desc!==""||Object.entries(x).length>0,g=f!==null,S=f?"_common.enabled_def_cbox":"_common.disabled_def_cbox";return(e,a)=>(u(),n("div",{class:V(l(_))},[b("label",{for:s.id,class:V(`form-check-label${l(p)?" mb-2":""}`)},[h(r(e.$t(l(v)))+" ",1),g?(u(),n("div",z,r(e.$t(l(S))),1)):y("",!0)],10,j),M(b("input",{type:"checkbox",class:"form-check-input",id:s.id,"onUpdate:modelValue":a[0]||(a[0]=t=>o.value=t),"true-value":l(i).truthy,"false-value":l(i).falsy},null,8,I),[[B,o.value]]),l(p)?(u(),n("div",N,[h(r(e.$t(l($)))+" ",1),w(e.$slots,"default")])):y("",!0)],2))}};export{F as P,L as _,A as a};
