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