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