import{S as y,i as w,s as C,e as h,m as R,f as B,a as _,b,g as r,c as G,h as E,j as g,u as S,v as j,x as q,y as z,z as D,o as H,C as K,E as O,K as T,H as A,G as F}from"./index.65fb5956.js";import{B as I}from"./BlockTitle.87c2b95a.js";function v(n,l,e){const u=n.slice();return u[8]=l[e],u[10]=e,u}function J(n){let l;return{c(){l=B(n[3])},m(e,u){b(e,l,u)},p(e,u){u&8&&E(l,e[3])},d(e){e&&g(l)}}}function k(n){let l,e,u,f,c,i=n[8]+"",s,a,d;return{c(){l=h("label"),e=h("input"),f=R(),c=h("span"),s=B(i),e.disabled=n[2],_(e,"type","radio"),_(e,"name","test"),_(e,"class","rounded-full gr-check-radio "),e.__value=u=n[8],e.value=e.__value,n[6][0].push(e),_(c,"class","ml-2"),_(l,"class","gr-box gr-box-sm ")},m(o,t){b(o,l,t),r(l,e),e.checked=e.__value===n[0],r(l,f),r(l,c),r(c,s),a||(d=G(e,"change",n[5]),a=!0)},p(o,t){t&4&&(e.disabled=o[2]),t&2&&u!==(u=o[8])&&(e.__value=u,e.value=e.__value),t&1&&(e.checked=e.__value===o[0]),t&2&&i!==(i=o[8]+"")&&E(s,i)},d(o){o&&g(l),n[6][0].splice(n[6][0].indexOf(e),1),a=!1,d()}}}function L(n){let l,e,u,f,c;e=new I({props:{$$slots:{default:[J]},$$scope:{ctx:n}}});let i=n[1],s=[];for(let a=0;a<i.length;a+=1)s[a]=k(v(n,i,a));return{c(){l=h("fieldset"),S(e.$$.fragment),u=R(),f=h("div");for(let a=0;a<s.length;a+=1)s[a].c();_(f,"class","flex flex-wrap gap-2"),_(l,"class","gr-box overflow-hidden border-solid border border-gray-200 gr-panel")},m(a,d){b(a,l,d),j(e,l,null),r(l,u),r(l,f);for(let o=0;o<s.length;o+=1)s[o].m(f,null);c=!0},p(a,[d]){const o={};if(d&2056&&(o.$$scope={dirty:d,ctx:a}),e.$set(o),d&7){i=a[1];let t;for(t=0;t<i.length;t+=1){const m=v(a,i,t);s[t]?s[t].p(m,d):(s[t]=k(m),s[t].c(),s[t].m(f,null))}for(;t<s.length;t+=1)s[t].d(1);s.length=i.length}},i(a){c||(q(e.$$.fragment,a),c=!0)},o(a){z(e.$$.fragment,a),c=!1},d(a){a&&g(l),D(e),H(s,a)}}}function M(n,l,e){let{value:u}=l,{choices:f}=l,{disabled:c=!1}=l,{label:i}=l,{style:s=""}=l;const a=K(),d=[[]];function o(){u=this.__value,e(0,u)}return n.$$set=t=>{"value"in t&&e(0,u=t.value),"choices"in t&&e(1,f=t.choices),"disabled"in t&&e(2,c=t.disabled),"label"in t&&e(3,i=t.label),"style"in t&&e(4,s=t.style)},n.$$.update=()=>{n.$$.dirty&1&&a("change",u)},[u,f,c,i,s,o,d]}class N extends y{constructor(l){super(),w(this,l,M,L,C,{value:0,choices:1,disabled:2,label:3,style:4})}}function P(n){let l,e,u;function f(i){n[6](i)}let c={label:n[1],style:n[2],choices:n[3],disabled:n[4]==="static"};return n[0]!==void 0&&(c.value=n[0]),l=new N({props:c}),O.push(()=>T(l,"value",f)),l.$on("change",n[7]),{c(){S(l.$$.fragment)},m(i,s){j(l,i,s),u=!0},p(i,[s]){const a={};s&2&&(a.label=i[1]),s&4&&(a.style=i[2]),s&8&&(a.choices=i[3]),s&16&&(a.disabled=i[4]==="static"),!e&&s&1&&(e=!0,a.value=i[0],A(()=>e=!1)),l.$set(a)},i(i){u||(q(l.$$.fragment,i),u=!0)},o(i){z(l.$$.fragment,i),u=!1},d(i){D(l,i)}}}function Q(n,l,e){let{label:u}=l,{value:f=""}=l,{default_value:c}=l,{style:i=""}=l,{choices:s=[]}=l,{mode:a}=l;c&&(f=c);function d(t){f=t,e(0,f)}function o(t){F.call(this,n,t)}return n.$$set=t=>{"label"in t&&e(1,u=t.label),"value"in t&&e(0,f=t.value),"default_value"in t&&e(5,c=t.default_value),"style"in t&&e(2,i=t.style),"choices"in t&&e(3,s=t.choices),"mode"in t&&e(4,a=t.mode)},[f,u,i,s,a,c,d,o]}class U extends y{constructor(l){super(),w(this,l,Q,P,C,{label:1,value:0,default_value:5,style:2,choices:3,mode:4})}}var X=U;const Y=["static","dynamic"];export{X as Component,Y as modes};
