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