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