import{S as E,i as q,s as C,e as w,o as _,k as T,a as k,b as v,q as b,f as B,a1 as N,l as S,aa as z,u as d,v as g,h as y,w as h,r as U,z as j,d as A,g as F,U as G,B as I,H as J,E as K,D}from"./index.3c784113.js";import{B as L}from"./Block.1239058b.js";import{B as M}from"./BlockTitle.0ab46369.js";import{S as O}from"./StatusTracker.eec9373b.js";function P(l){let e;return{c(){e=A(l[2])},m(a,n){v(a,e,n)},p(a,n){n&4&&F(e,a[2])},d(a){a&&y(e)}}}function Q(l){let e,a,n,s,u,o,m;return a=new M({props:{$$slots:{default:[P]},$$scope:{ctx:l}}}),{c(){e=w("label"),_(a.$$.fragment),n=T(),s=w("input"),k(s,"type","number"),k(s,"class","gr-box gr-input w-full gr-text-input"),s.disabled=l[1],k(e,"class","block")},m(t,i){v(t,e,i),b(a,e,null),B(e,n),B(e,s),N(s,l[0]),u=!0,o||(m=[S(s,"input",l[5]),S(s,"keypress",l[3])],o=!0)},p(t,[i]){const c={};i&260&&(c.$$scope={dirty:i,ctx:t}),a.$set(c),(!u||i&2)&&(s.disabled=t[1]),i&1&&z(s.value)!==t[0]&&N(s,t[0])},i(t){u||(d(a.$$.fragment,t),u=!0)},o(t){g(a.$$.fragment,t),u=!1},d(t){t&&y(e),h(a),o=!1,U(m)}}}function R(l,e,a){let{value:n=0}=e,{disabled:s=!1}=e,{label:u}=e,{style:o=""}=e;const m=j();function t(f){m("change",f)}async function i(f){await G(),f.key==="Enter"&&(f.preventDefault(),m("submit"))}function c(){n=z(this.value),a(0,n)}return l.$$set=f=>{"value"in f&&a(0,n=f.value),"disabled"in f&&a(1,s=f.disabled),"label"in f&&a(2,u=f.label),"style"in f&&a(4,o=f.style)},l.$$.update=()=>{l.$$.dirty&1&&t(n)},[n,s,u,i,o,c]}class V extends E{constructor(e){super(),q(this,e,R,Q,C,{value:0,disabled:1,label:2,style:4})}}function W(l){let e,a,n,s,u;e=new O({props:{tracked_status:l[3]}});function o(t){l[7](t)}let m={label:l[1],style:l[4],disabled:l[5]==="static"};return l[0]!==void 0&&(m.value=l[0]),n=new V({props:m}),I.push(()=>J(n,"value",o)),n.$on("change",l[8]),n.$on("submit",l[9]),{c(){_(e.$$.fragment),a=T(),_(n.$$.fragment)},m(t,i){b(e,t,i),v(t,a,i),b(n,t,i),u=!0},p(t,i){const c={};i&8&&(c.tracked_status=t[3]),e.$set(c);const f={};i&2&&(f.label=t[1]),i&16&&(f.style=t[4]),i&32&&(f.disabled=t[5]==="static"),!s&&i&1&&(s=!0,f.value=t[0],K(()=>s=!1)),n.$set(f)},i(t){u||(d(e.$$.fragment,t),d(n.$$.fragment,t),u=!0)},o(t){g(e.$$.fragment,t),g(n.$$.fragment,t),u=!1},d(t){h(e,t),t&&y(a),h(n,t)}}}function X(l){let e,a;return e=new L({props:{form_position:l[2],$$slots:{default:[W]},$$scope:{ctx:l}}}),{c(){_(e.$$.fragment)},m(n,s){b(e,n,s),a=!0},p(n,[s]){const u={};s&4&&(u.form_position=n[2]),s&1083&&(u.$$scope={dirty:s,ctx:n}),e.$set(u)},i(n){a||(d(e.$$.fragment,n),a=!0)},o(n){g(e.$$.fragment,n),a=!1},d(n){h(e,n)}}}function Y(l,e,a){let{label:n="Number"}=e,{value:s=0}=e,{default_value:u}=e,{form_position:o="single"}=e,{loading_status:m}=e,{style:t=""}=e,{mode:i}=e;u&&(s=u);function c(r){s=r,a(0,s)}function f(r){D.call(this,l,r)}function H(r){D.call(this,l,r)}return l.$$set=r=>{"label"in r&&a(1,n=r.label),"value"in r&&a(0,s=r.value),"default_value"in r&&a(6,u=r.default_value),"form_position"in r&&a(2,o=r.form_position),"loading_status"in r&&a(3,m=r.loading_status),"style"in r&&a(4,t=r.style),"mode"in r&&a(5,i=r.mode)},[s,n,o,m,t,i,u,c,f,H]}class Z extends E{constructor(e){super(),q(this,e,Y,X,C,{label:1,value:0,default_value:6,form_position:2,loading_status:3,style:4,mode:5})}}var te=Z;const ae=["static","dynamic"];export{te as Component,ae as modes};
