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