import{p as c,i as C,b as E,t as R}from"./i18n-eTakDDhg.js";import{R as V,u as W,v as X,y as Y,w as n,x as Z,t as d,Z as _,a as b,T as j,V as h,X as z,W as f,a5 as A,Y as v,a0 as B}from"./index-BkylzejB.js";import{s as D}from"./clone-IGppQJ7B.js";import{a as F}from"./input-l8ysRorr.js";var G=f('<span class="label-text svelte-1q8xtp9"> </span>'),H=f('<label><input type="checkbox" name="test" data-testid="checkbox" class="svelte-1q8xtp9"/> <!></label>');function M(x,a){V(a,!0);let k=c(a,"label",3,"Checkbox"),t=c(a,"value",15),m=c(a,"interactive",3,!0),p=c(a,"show_label",3,!0),i=A(()=>!m()),o=W(X(t()));Y(()=>{n(o)!==t()&&(Z(o,t(),!0),a.on_change?.(D(t())))});async function g(e){e.key==="Enter"&&(t(!t()),a.on_select?.({index:0,value:e.currentTarget.checked,selected:e.currentTarget.checked}))}async function y(e){t(e.currentTarget.checked),a.on_select?.({index:0,value:e.currentTarget.checked,selected:e.currentTarget.checked}),a.on_input?.()}var l=H();let u;var s=h(l);R(s);var T=z(s,2);{var w=e=>{var r=G(),q=h(r,!0);v(r),d(()=>B(q,k())),b(e,r)};C(T,e=>{p()&&e(w)})}v(l),d(()=>{u=E(l,1,"checkbox-container svelte-1q8xtp9",null,u,{disabled:n(i)}),s.disabled=n(i)}),F(s,t),_("keydown",s,g),_("input",s,y),b(x,l),j()}export{M as C};
