import{S as j,i as q,s as B,f as d,m as E,h as F,b as m,t as y,c as A,d as h,l as I,j as K,n as S,e as D,A as L,q as g,u as k,v as w,w as v,x as C,K as M,C as T,I as z,L as G,M as H,F as J,E as N}from"./index.43a672aa.js";import{B as O}from"./Block.dd660513.js";import{S as P}from"./StatusTracker.a32689a5.js";function Q(s){let e,t,a,o,c,u,_;return{c(){e=d("label"),t=d("input"),a=E(),o=d("span"),c=F(s[2]),t.disabled=s[1],m(t,"type","checkbox"),m(t,"name","test"),m(t,"class","gr-check-radio gr-checkbox"),m(o,"class","ml-2"),m(e,"class","flex items-center text-gray-700 text-sm space-x-2 rounded-lg cursor-pointer bg-white dark:bg-transparent"),y(e,"!cursor-not-allowed",s[1])},m(f,n){A(f,e,n),h(e,t),t.checked=s[0],h(e,a),h(e,o),h(o,c),u||(_=I(t,"change",s[5]),u=!0)},p(f,[n]){n&2&&(t.disabled=f[1]),n&1&&(t.checked=f[0]),n&4&&K(c,f[2]),n&2&&y(e,"!cursor-not-allowed",f[1])},i:S,o:S,d(f){f&&D(e),u=!1,_()}}}function R(s,e,t){let{value:a}=e,{disabled:o=!1}=e,{label:c}=e,{style:u=""}=e,{show_label:_}=e;L();function f(){a=this.checked,t(0,a)}return s.$$set=n=>{"value"in n&&t(0,a=n.value),"disabled"in n&&t(1,o=n.disabled),"label"in n&&t(2,c=n.label),"style"in n&&t(3,u=n.style),"show_label"in n&&t(4,_=n.show_label)},[a,o,c,u,_,f]}class U extends j{constructor(e){super(),q(this,e,R,Q,B,{value:0,disabled:1,label:2,style:3,show_label:4})}}function V(s){let e,t,a,o,c;const u=[s[6]];let _={};for(let l=0;l<u.length;l+=1)_=M(_,u[l]);e=new P({props:_});function f(l){s[7](l)}let n={style:s[1],label:s[2],show_label:s[5],disabled:s[3]==="static"};return s[0]!==void 0&&(n.value=s[0]),a=new U({props:n}),T.push(()=>z(a,"value",f)),a.$on("change",s[8]),{c(){g(e.$$.fragment),t=E(),g(a.$$.fragment)},m(l,r){k(e,l,r),A(l,t,r),k(a,l,r),c=!0},p(l,r){const i=r&64?G(u,[H(l[6])]):{};e.$set(i);const b={};r&2&&(b.style=l[1]),r&4&&(b.label=l[2]),r&32&&(b.show_label=l[5]),r&8&&(b.disabled=l[3]==="static"),!o&&r&1&&(o=!0,b.value=l[0],J(()=>o=!1)),a.$set(b)},i(l){c||(w(e.$$.fragment,l),w(a.$$.fragment,l),c=!0)},o(l){v(e.$$.fragment,l),v(a.$$.fragment,l),c=!1},d(l){C(e,l),l&&D(t),C(a,l)}}}function W(s){let e,t;return e=new O({props:{form_position:s[4],$$slots:{default:[V]},$$scope:{ctx:s}}}),{c(){g(e.$$.fragment)},m(a,o){k(e,a,o),t=!0},p(a,[o]){const c={};o&16&&(c.form_position=a[4]),o&623&&(c.$$scope={dirty:o,ctx:a}),e.$set(c)},i(a){t||(w(e.$$.fragment,a),t=!0)},o(a){v(e.$$.fragment,a),t=!1},d(a){C(e,a)}}}function X(s,e,t){let{value:a=!1}=e,{style:o=""}=e,{label:c="Checkbox"}=e,{mode:u}=e,{form_position:_="single"}=e,{show_label:f}=e,{loading_status:n}=e;function l(i){a=i,t(0,a)}function r(i){N.call(this,s,i)}return s.$$set=i=>{"value"in i&&t(0,a=i.value),"style"in i&&t(1,o=i.style),"label"in i&&t(2,c=i.label),"mode"in i&&t(3,u=i.mode),"form_position"in i&&t(4,_=i.form_position),"show_label"in i&&t(5,f=i.show_label),"loading_status"in i&&t(6,n=i.loading_status)},[a,o,c,u,_,f,n,l,r]}class Y extends j{constructor(e){super(),q(this,e,X,W,B,{value:0,style:1,label:2,mode:3,form_position:4,show_label:5,loading_status:6})}}var $=Y;const ee=["static","dynamic"];export{$ as Component,ee as modes};
