import{S as B,i as q,s as D,e as h,k as E,d as H,a as r,t as C,b as j,f as d,l as J,g as K,n as S,h as z,z as L,o as g,q as k,u as w,v,w as y,J as T,B as A,H as F,K as G,L as I,E as M,D as N}from"./index.c156a17d.js";import{B as O}from"./Block.dfe8f898.js";import{S as P}from"./StatusTracker.f0d63e01.js";function Q(n){let e,t,l,i,u,c,_;return{c(){e=h("label"),t=h("input"),l=E(),i=h("span"),u=H(n[2]),t.disabled=n[1],r(t,"type","checkbox"),r(t,"name","test"),r(t,"class","rounded border-gray-300 text-blue-600 disabled:text-gray-400 disabled:!cursor-not-allowed shadow-sm focus:border-blue-300 focus:ring focus:ring-offset-0 focus:ring-blue-200 focus:ring-opacity-50"),r(i,"class","ml-2"),r(e,"class","flex items-center text-gray-700 text-sm space-x-2 rounded-lg cursor-pointer bg-white"),r(e,"style",n[3]),C(e,"!cursor-not-allowed",n[1])},m(f,o){j(f,e,o),d(e,t),t.checked=n[0],d(e,l),d(e,i),d(i,u),c||(_=J(t,"change",n[5]),c=!0)},p(f,[o]){o&2&&(t.disabled=f[1]),o&1&&(t.checked=f[0]),o&4&&K(u,f[2]),o&8&&r(e,"style",f[3]),o&2&&C(e,"!cursor-not-allowed",f[1])},i:S,o:S,d(f){f&&z(e),c=!1,_()}}}function R(n,e,t){let{value:l}=e,{disabled:i=!1}=e,{label:u}=e,{style:c=""}=e,{show_label:_}=e;L();function f(){l=this.checked,t(0,l)}return n.$$set=o=>{"value"in o&&t(0,l=o.value),"disabled"in o&&t(1,i=o.disabled),"label"in o&&t(2,u=o.label),"style"in o&&t(3,c=o.style),"show_label"in o&&t(4,_=o.show_label)},[l,i,u,c,_,f]}class U extends B{constructor(e){super(),q(this,e,R,Q,D,{value:0,disabled:1,label:2,style:3,show_label:4})}}function V(n){let e,t,l,i,u;const c=[n[6]];let _={};for(let a=0;a<c.length;a+=1)_=T(_,c[a]);e=new P({props:_});function f(a){n[8](a)}let o={style:n[1],label:n[2],show_label:n[5],disabled:n[3]==="static"};return n[0]!==void 0&&(o.value=n[0]),l=new U({props:o}),A.push(()=>F(l,"value",f)),l.$on("change",n[9]),{c(){g(e.$$.fragment),t=E(),g(l.$$.fragment)},m(a,b){k(e,a,b),j(a,t,b),k(l,a,b),u=!0},p(a,b){const m=b&64?G(c,[I(a[6])]):{};e.$set(m);const s={};b&2&&(s.style=a[1]),b&4&&(s.label=a[2]),b&32&&(s.show_label=a[5]),b&8&&(s.disabled=a[3]==="static"),!i&&b&1&&(i=!0,s.value=a[0],M(()=>i=!1)),l.$set(s)},i(a){u||(w(e.$$.fragment,a),w(l.$$.fragment,a),u=!0)},o(a){v(e.$$.fragment,a),v(l.$$.fragment,a),u=!1},d(a){y(e,a),a&&z(t),y(l,a)}}}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(l,i){k(e,l,i),t=!0},p(l,[i]){const u={};i&16&&(u.form_position=l[4]),i&1135&&(u.$$scope={dirty:i,ctx:l}),e.$set(u)},i(l){t||(w(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){y(e,l)}}}function X(n,e,t){let{value:l=!1}=e,{default_value:i=!1}=e,{style:u=""}=e,{label:c="Checkbox"}=e,{mode:_}=e,{form_position:f="single"}=e,{show_label:o}=e,{loading_status:a}=e;i&&(l=i);function b(s){l=s,t(0,l)}function m(s){N.call(this,n,s)}return n.$$set=s=>{"value"in s&&t(0,l=s.value),"default_value"in s&&t(7,i=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,o=s.show_label),"loading_status"in s&&t(6,a=s.loading_status)},[l,u,c,_,f,o,a,i,b,m]}class Y extends B{constructor(e){super(),q(this,e,X,W,D,{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};
