import{S as E,i as T,s as A,f as D,h as F,c as v,d as B,j as I,e as k,q as d,m as K,b as L,a8 as M,u as b,a9 as C,l as y,v as m,w as g,x as w,o as z,A as G,aa as H,K as J,C as N,I as O,L as P,M as Q,F as R,E as U}from"./index.43a672aa.js";import{B as V}from"./Block.dd660513.js";import{B as W}from"./BlockTitle.0dbc5573.js";import{S as X}from"./StatusTracker.a32689a5.js";function j(s,e,t){const a=s.slice();return a[8]=e[t],a[10]=t,a}function Y(s){let e;return{c(){e=F(s[1])},m(t,a){v(t,e,a)},p(t,a){a&2&&I(e,t[1])},d(t){t&&k(e)}}}function q(s){let e,t=s[8]+"",a,o;return{c(){e=D("option"),a=F(t),e.__value=o=s[8],e.value=e.__value},m(f,c){v(f,e,c),B(e,a)},p(f,c){c&4&&t!==(t=f[8]+"")&&I(a,t),c&4&&o!==(o=f[8])&&(e.__value=o,e.value=e.__value)},d(f){f&&k(e)}}}function Z(s){let e,t,a,o,f,c,r;t=new W({props:{show_label:s[4],$$slots:{default:[Y]},$$scope:{ctx:s}}});let _=s[2],u=[];for(let l=0;l<_.length;l+=1)u[l]=q(j(s,_,l));return{c(){e=D("label"),d(t.$$.fragment),a=K(),o=D("select");for(let l=0;l<u.length;l+=1)u[l].c();L(o,"class","gr-box gr-input w-full disabled:cursor-not-allowed"),o.disabled=s[3],s[0]===void 0&&M(()=>s[6].call(o))},m(l,i){v(l,e,i),b(t,e,null),B(e,a),B(e,o);for(let h=0;h<u.length;h+=1)u[h].m(o,null);C(o,s[0]),f=!0,c||(r=y(o,"change",s[6]),c=!0)},p(l,[i]){const h={};if(i&16&&(h.show_label=l[4]),i&2050&&(h.$$scope={dirty:i,ctx:l}),t.$set(h),i&4){_=l[2];let n;for(n=0;n<_.length;n+=1){const S=j(l,_,n);u[n]?u[n].p(S,i):(u[n]=q(S),u[n].c(),u[n].m(o,null))}for(;n<u.length;n+=1)u[n].d(1);u.length=_.length}(!f||i&8)&&(o.disabled=l[3]),i&5&&C(o,l[0])},i(l){f||(m(t.$$.fragment,l),f=!0)},o(l){g(t.$$.fragment,l),f=!1},d(l){l&&k(e),w(t),z(u,l),c=!1,r()}}}function p(s,e,t){let{label:a}=e,{value:o=void 0}=e,{choices:f}=e,{style:c=""}=e,{disabled:r=!1}=e,{show_label:_}=e;const u=G();function l(){o=H(this),t(0,o),t(2,f)}return s.$$set=i=>{"label"in i&&t(1,a=i.label),"value"in i&&t(0,o=i.value),"choices"in i&&t(2,f=i.choices),"style"in i&&t(5,c=i.style),"disabled"in i&&t(3,r=i.disabled),"show_label"in i&&t(4,_=i.show_label)},s.$$.update=()=>{s.$$.dirty&1&&u("change",o)},[o,a,f,r,_,c,l]}class x extends E{constructor(e){super(),T(this,e,p,Z,A,{label:1,value:0,choices:2,style:5,disabled:3,show_label:4})}}function $(s){let e,t,a,o,f;const c=[s[6]];let r={};for(let l=0;l<c.length;l+=1)r=J(r,c[l]);e=new X({props:r});function _(l){s[8](l)}let u={style:s[2],choices:s[3],label:s[1],show_label:s[5]};return s[0]!==void 0&&(u.value=s[0]),a=new x({props:u}),N.push(()=>O(a,"value",_)),a.$on("change",s[9]),{c(){d(e.$$.fragment),t=K(),d(a.$$.fragment)},m(l,i){b(e,l,i),v(l,t,i),b(a,l,i),f=!0},p(l,i){const h=i&64?P(c,[Q(l[6])]):{};e.$set(h);const n={};i&4&&(n.style=l[2]),i&8&&(n.choices=l[3]),i&2&&(n.label=l[1]),i&32&&(n.show_label=l[5]),!o&&i&1&&(o=!0,n.value=l[0],R(()=>o=!1)),a.$set(n)},i(l){f||(m(e.$$.fragment,l),m(a.$$.fragment,l),f=!0)},o(l){g(e.$$.fragment,l),g(a.$$.fragment,l),f=!1},d(l){w(e,l),l&&k(t),w(a,l)}}}function ee(s){let e,t;return e=new V({props:{form_position:s[4],$$slots:{default:[$]},$$scope:{ctx:s}}}),{c(){d(e.$$.fragment)},m(a,o){b(e,a,o),t=!0},p(a,[o]){const f={};o&16&&(f.form_position=a[4]),o&1135&&(f.$$scope={dirty:o,ctx:a}),e.$set(f)},i(a){t||(m(e.$$.fragment,a),t=!0)},o(a){g(e.$$.fragment,a),t=!1},d(a){w(e,a)}}}function le(s,e,t){let{label:a="Dropdown"}=e,{value:o=""}=e,{style:f=""}=e,{choices:c}=e,{form_position:r="single"}=e,{show_label:_}=e,{loading_status:u}=e,{mode:l}=e;function i(n){o=n,t(0,o)}function h(n){U.call(this,s,n)}return s.$$set=n=>{"label"in n&&t(1,a=n.label),"value"in n&&t(0,o=n.value),"style"in n&&t(2,f=n.style),"choices"in n&&t(3,c=n.choices),"form_position"in n&&t(4,r=n.form_position),"show_label"in n&&t(5,_=n.show_label),"loading_status"in n&&t(6,u=n.loading_status),"mode"in n&&t(7,l=n.mode)},[o,a,f,c,r,_,u,l,i,h]}class te extends E{constructor(e){super(),T(this,e,le,ee,A,{label:1,value:0,style:2,choices:3,form_position:4,show_label:5,loading_status:6,mode:7})}}var ie=te;const fe=["static","dynamic"];export{ie as Component,fe as modes};
