import{S as j,i as q,s as B,f as h,m as E,h as F,b as r,t as y,c as A,d as m,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.f808f2eb.js";import{B as O}from"./Block.58108406.js";import{S as P}from"./StatusTracker.9996b515.js";function Q(n){let e,t,a,o,u,c,_;return{c(){e=h("label"),t=h("input"),a=E(),o=h("span"),u=F(n[2]),t.disabled=n[1],r(t,"type","checkbox"),r(t,"name","test"),r(t,"class","gr-check-radio gr-checkbox"),r(o,"class","ml-2"),r(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",n[1])},m(f,i){A(f,e,i),m(e,t),t.checked=n[0],m(e,a),m(e,o),m(o,u),c||(_=I(t,"change",n[5]),c=!0)},p(f,[i]){i&2&&(t.disabled=f[1]),i&1&&(t.checked=f[0]),i&4&&K(u,f[2]),i&2&&y(e,"!cursor-not-allowed",f[1])},i:S,o:S,d(f){f&&D(e),c=!1,_()}}}function R(n,e,t){let{value:a}=e,{disabled:o=!1}=e,{label:u}=e,{style:c=""}=e,{show_label:_}=e;L();function f(){a=this.checked,t(0,a)}return n.$$set=i=>{"value"in i&&t(0,a=i.value),"disabled"in i&&t(1,o=i.disabled),"label"in i&&t(2,u=i.label),"style"in i&&t(3,c=i.style),"show_label"in i&&t(4,_=i.show_label)},[a,o,u,c,_,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(n){let e,t,a,o,u;const c=[n[6]];let _={};for(let l=0;l<c.length;l+=1)_=M(_,c[l]);e=new P({props:_});function f(l){n[8](l)}let i={style:n[1],label:n[2],show_label:n[5],disabled:n[3]==="static"};return n[0]!==void 0&&(i.value=n[0]),a=new U({props:i}),T.push(()=>z(a,"value",f)),a.$on("change",n[9]),{c(){g(e.$$.fragment),t=E(),g(a.$$.fragment)},m(l,b){k(e,l,b),A(l,t,b),k(a,l,b),u=!0},p(l,b){const d=b&64?G(c,[H(l[6])]):{};e.$set(d);const s={};b&2&&(s.style=l[1]),b&4&&(s.label=l[2]),b&32&&(s.show_label=l[5]),b&8&&(s.disabled=l[3]==="static"),!o&&b&1&&(o=!0,s.value=l[0],J(()=>o=!1)),a.$set(s)},i(l){u||(w(e.$$.fragment,l),w(a.$$.fragment,l),u=!0)},o(l){v(e.$$.fragment,l),v(a.$$.fragment,l),u=!1},d(l){C(e,l),l&&D(t),C(a,l)}}}function W(n){let e,t;return e=new O({props:{form_position:n[4],$$slots:{default:[V]},$$scope:{ctx:n}}}),{c(){g(e.$$.fragment)},m(a,o){k(e,a,o),t=!0},p(a,[o]){const u={};o&16&&(u.form_position=a[4]),o&1135&&(u.$$scope={dirty:o,ctx:a}),e.$set(u)},i(a){t||(w(e.$$.fragment,a),t=!0)},o(a){v(e.$$.fragment,a),t=!1},d(a){C(e,a)}}}function X(n,e,t){let{value:a=!1}=e,{default_value:o=!1}=e,{style:u=""}=e,{label:c="Checkbox"}=e,{mode:_}=e,{form_position:f="single"}=e,{show_label:i}=e,{loading_status:l}=e;o&&(a=o);function b(s){a=s,t(0,a)}function d(s){N.call(this,n,s)}return n.$$set=s=>{"value"in s&&t(0,a=s.value),"default_value"in s&&t(7,o=s.default_value),"style"in s&&t(1,u=s.style),"label"in s&&t(2,c=s.label),"mode"in s&&t(3,_=s.mode),"form_position"in s&&t(4,f=s.form_position),"show_label"in s&&t(5,i=s.show_label),"loading_status"in s&&t(6,l=s.loading_status)},[a,u,c,_,f,i,l,o,b,d]}class Y extends j{constructor(e){super(),q(this,e,X,W,B,{value:0,default_value:7,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};
