import{B as e,D as t,F as n,M as r,N as i,R as a,T as o,d as s,g as c,k as l,s as u,v as d,x as f,y as p,z as m}from"./logo-sunshine-45-B0-ae2pw.js";var h=u(`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`}]]),g=u(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),_=[`for`],v={key:0,class:`mt-0 form-text`},y=[`id`,`true-value`,`false-value`],b={key:0,class:`form-text`},x={__name:`Checkbox`,props:o({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(o){let u=r(o,`modelValue`),h=i(),g=o,x=(()=>{let e=g.class.split(` `);return e.includes(`form-check`)||e.push(`form-check`),e.join(` `)})(),S=e=>{if(e===!0||e===!1)return{possibleValues:[!0,!1],value:e};if(e===1||e===0)return{possibleValues:[1,0],value:e};let t=[[`true`,`false`],[`1`,`0`],[`enabled`,`disabled`],[`enable`,`disable`],[`yes`,`no`],[`on`,`off`]];e=`${e}`.toLowerCase().trim();for(let n of t)if(e===n[0]||e===n[1])return{possibleValues:n,value:e};return null},C=(()=>{let e=(()=>{let e=S(u.value);return e===null?(console.error(`Checkbox value ${u.value} did not match any acceptable pattern!`),[`true`,`false`]):e.possibleValues})(),t=+!!g.inverseValues,n=+!g.inverseValues;return{truthy:e[t],falsy:e[n]}})(),w=(()=>{let e=S(g.default);return e===null?null:e.value===e.possibleValues[0]})(),T=g.label??`${g.localePrefix}.${g.id}`,E=g.desc??`${g.localePrefix}.${g.id}_desc`,D=g.desc!==``||Object.entries(h).length>0,O=w!==null,k=w?`_common.enabled_def_cbox`:`_common.disabled_def_cbox`;return(r,i)=>(t(),p(`div`,{class:m(a(x))},[c(`label`,{for:g.id,class:m(`form-check-label${a(D)?` mb-2`:``}`)},[f(e(r.$t(a(T)))+` `,1),O?(t(),p(`div`,v,e(r.$t(a(k))),1)):d(``,!0)],10,_),n(c(`input`,{type:`checkbox`,class:`form-check-input`,id:g.id,"onUpdate:modelValue":i[0]||=e=>u.value=e,"true-value":a(C).truthy,"false-value":a(C).falsy},null,8,y),[[s,u.value]]),a(D)?(t(),p(`div`,b,[f(e(r.$t(a(E)))+` `,1),l(r.$slots,`default`)])):d(``,!0)],2))}};export{g as n,h as r,x as t};