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