import{S as _,i as h,s as g,u as k,v,x as y,y as w,z as C,C as x,e as d,m as B,f as E,a as r,t as m,b as S,g as b,c as j,h as q,j as z,E as D,K as G,H,G as K}from"./index.bbdd6a1e.js";import{B as A}from"./Block.aea3d209.js";function F(s){let e,t,a,c,u,n,i;return{c(){e=d("label"),t=d("input"),a=B(),c=d("span"),u=E(s[2]),t.disabled=s[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(c,"class","ml-2"),r(e,"class","flex items-center text-gray-700 text-sm space-x-2 rounded-lg cursor-pointer bg-white"),m(e,"!cursor-not-allowed",s[1])},m(l,f){S(l,e,f),b(e,t),t.checked=s[0],b(e,a),b(e,c),b(c,u),n||(i=j(t,"change",s[4]),n=!0)},p(l,f){f&2&&(t.disabled=l[1]),f&1&&(t.checked=l[0]),f&4&&q(u,l[2]),f&2&&m(e,"!cursor-not-allowed",l[1])},d(l){l&&z(e),n=!1,i()}}}function I(s){let e,t;return e=new A({props:{$$slots:{default:[F]},$$scope:{ctx:s}}}),{c(){k(e.$$.fragment)},m(a,c){v(e,a,c),t=!0},p(a,[c]){const u={};c&135&&(u.$$scope={dirty:c,ctx:a}),e.$set(u)},i(a){t||(y(e.$$.fragment,a),t=!0)},o(a){w(e.$$.fragment,a),t=!1},d(a){C(e,a)}}}function J(s,e,t){let{value:a}=e,{disabled:c=!1}=e,{label:u}=e,{style:n=""}=e;x();function i(){a=this.checked,t(0,a)}return s.$$set=l=>{"value"in l&&t(0,a=l.value),"disabled"in l&&t(1,c=l.disabled),"label"in l&&t(2,u=l.label),"style"in l&&t(3,n=l.style)},[a,c,u,n,i]}class L extends _{constructor(e){super(),h(this,e,J,I,g,{value:0,disabled:1,label:2,style:3})}}function M(s){let e,t,a;function c(n){s[5](n)}let u={style:s[1],label:s[2],disabled:s[3]==="static"};return s[0]!==void 0&&(u.value=s[0]),e=new L({props:u}),D.push(()=>G(e,"value",c)),e.$on("change",s[6]),{c(){k(e.$$.fragment)},m(n,i){v(e,n,i),a=!0},p(n,[i]){const l={};i&2&&(l.style=n[1]),i&4&&(l.label=n[2]),i&8&&(l.disabled=n[3]==="static"),!t&&i&1&&(t=!0,l.value=n[0],H(()=>t=!1)),e.$set(l)},i(n){a||(y(e.$$.fragment,n),a=!0)},o(n){w(e.$$.fragment,n),a=!1},d(n){C(e,n)}}}function N(s,e,t){let{value:a=!1}=e,{default_value:c=!1}=e,{style:u=""}=e,{label:n="Checkbox"}=e,{mode:i}=e;c&&(a=c);function l(o){a=o,t(0,a)}function f(o){K.call(this,s,o)}return s.$$set=o=>{"value"in o&&t(0,a=o.value),"default_value"in o&&t(4,c=o.default_value),"style"in o&&t(1,u=o.style),"label"in o&&t(2,n=o.label),"mode"in o&&t(3,i=o.mode)},[a,u,n,i,c,l,f]}class O extends _{constructor(e){super(),h(this,e,N,M,g,{value:0,default_value:4,style:1,label:2,mode:3})}}var R=O;const T=["static","dynamic"];export{R as Component,T as modes};
