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