import{S as j,i as q,s as z,u as b,v as g,x as v,y as w,z as k,C as K,e as h,f as G,b as y,g as m,h as H,j as B,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.65fb5956.js";import{B as Q}from"./Block.3fbf618d.js";import{B as R}from"./BlockTitle.87c2b95a.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){y(l,e,n)},p(l,n){n&2&&H(e,l[1])},d(l){l&&B(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(i,c){y(i,e,c),m(e,n)},p(i,c){c&4&&l!==(l=i[7]+"")&&H(n,l),c&4&&s!==(s=i[7])&&(e.__value=s,e.value=e.__value)},d(i){i&&B(e)}}}function V(a){let e,l,n,s,i,c,_;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"),b(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"),s.disabled=a[3],a[0]===void 0&&F(()=>a[5].call(s))},m(t,o){y(t,e,o),g(l,e,null),m(e,n),m(e,s);for(let d=0;d<f.length;d+=1)f[d].m(s,null);C(s,a[0]),i=!0,c||(_=I(s,"change",a[5]),c=!0)},p(t,o){const d={};if(o&1026&&(d.$$scope={dirty:o,ctx:t}),l.$set(d),o&4){u=t[2];let r;for(r=0;r<u.length;r+=1){const D=E(t,u,r);f[r]?f[r].p(D,o):(f[r]=S(D),f[r].c(),f[r].m(s,null))}for(;r<f.length;r+=1)f[r].d(1);f.length=u.length}(!i||o&8)&&(s.disabled=t[3]),o&5&&C(s,t[0])},i(t){i||(v(l.$$.fragment,t),i=!0)},o(t){w(l.$$.fragment,t),i=!1},d(t){t&&B(e),k(l),J(f,t),c=!1,_()}}}function W(a){let e,l;return e=new Q({props:{$$slots:{default:[V]},$$scope:{ctx:a}}}),{c(){b(e.$$.fragment)},m(n,s){g(e,n,s),l=!0},p(n,[s]){const i={};s&1039&&(i.$$scope={dirty:s,ctx:n}),e.$set(i)},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:i}=e,{style:c=""}=e,{disabled:_=!1}=e;const u=K();function f(){s=L(this),l(0,s),l(2,i)}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,i=t.choices),"style"in t&&l(4,c=t.style),"disabled"in t&&l(3,_=t.disabled)},a.$$.update=()=>{a.$$.dirty&1&&u("change",s)},[s,n,i,_,c,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(c){a[6](c)}let i={style:a[2],choices:a[3],label:a[1],disabled:a[4]==="static"};return a[0]!==void 0&&(i.value=a[0]),e=new Y({props:i}),M.push(()=>N(e,"value",s)),e.$on("change",a[7]),{c(){b(e.$$.fragment)},m(c,_){g(e,c,_),n=!0},p(c,[_]){const u={};_&4&&(u.style=c[2]),_&8&&(u.choices=c[3]),_&2&&(u.label=c[1]),_&16&&(u.disabled=c[4]==="static"),!l&&_&1&&(l=!0,u.value=c[0],O(()=>l=!1)),e.$set(u)},i(c){n||(v(e.$$.fragment,c),n=!0)},o(c){w(e.$$.fragment,c),n=!1},d(c){k(e,c)}}}function p(a,e,l){let{label:n=""}=e,{value:s=""}=e,{default_value:i=""}=e,{style:c=""}=e,{choices:_}=e,{mode:u}=e;i&&(s=i);function f(o){s=o,l(0,s)}function t(o){P.call(this,a,o)}return a.$$set=o=>{"label"in o&&l(1,n=o.label),"value"in o&&l(0,s=o.value),"default_value"in o&&l(5,i=o.default_value),"style"in o&&l(2,c=o.style),"choices"in o&&l(3,_=o.choices),"mode"in o&&l(4,u=o.mode)},[s,n,c,_,u,i,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};
