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