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