import{S as k,i as R,s as C,e as h,m as B,f as E,a as r,t as v,b,g as _,c as H,h as S,j as g,u as j,v as q,x as z,y as D,z as G,o as K,C as O,E as T,K as A,H as F,G as I}from"./index.bbdd6a1e.js";import{B as J}from"./BlockTitle.5d44bbf1.js";function w(n,l,e){const u=n.slice();return u[8]=l[e],u[10]=e,u}function L(n){let l;return{c(){l=E(n[3])},m(e,u){b(e,l,u)},p(e,u){u&8&&S(l,e[3])},d(e){e&&g(l)}}}function y(n){let l,e,u,f,o,s=n[8]+"",i,a,d;return{c(){l=h("label"),e=h("input"),f=B(),o=h("span"),i=E(s),e.disabled=n[2],r(e,"type","radio"),r(e,"name","test"),r(e,"class","rounded-full border-gray-300 text-blue-600 disabled:text-gray-400 disabled:cursor-not-allowed shadow-sm focus:border-blue-300 focus:ring focus:ring-offset-0 focus:ring-blue-200 focus:ring-opacity-50"),e.__value=u=n[8],e.value=e.__value,n[6][0].push(e),r(o,"class","ml-2"),r(l,"class","flex items-center text-gray-700 text-sm space-x-2 border py-1.5 px-3 rounded-lg cursor-pointer bg-white shadow-sm checked:shadow-inner"),v(l,"!cursor-not-allowed",n[2])},m(c,t){b(c,l,t),_(l,e),e.checked=e.__value===n[0],_(l,f),_(l,o),_(o,i),a||(d=H(e,"change",n[5]),a=!0)},p(c,t){t&4&&(e.disabled=c[2]),t&2&&u!==(u=c[8])&&(e.__value=u,e.value=e.__value),t&1&&(e.checked=e.__value===c[0]),t&2&&s!==(s=c[8]+"")&&S(i,s),t&4&&v(l,"!cursor-not-allowed",c[2])},d(c){c&&g(l),n[6][0].splice(n[6][0].indexOf(e),1),a=!1,d()}}}function M(n){let l,e,u,f,o;e=new J({props:{$$slots:{default:[L]},$$scope:{ctx:n}}});let s=n[1],i=[];for(let a=0;a<s.length;a+=1)i[a]=y(w(n,s,a));return{c(){l=h("fieldset"),j(e.$$.fragment),u=B(),f=h("div");for(let a=0;a<i.length;a+=1)i[a].c();r(f,"class","flex flex-wrap gap-2"),r(l,"class","gr-box overflow-hidden border-solid border border-gray-200 gr-panel")},m(a,d){b(a,l,d),q(e,l,null),_(l,u),_(l,f);for(let c=0;c<i.length;c+=1)i[c].m(f,null);o=!0},p(a,[d]){const c={};if(d&2056&&(c.$$scope={dirty:d,ctx:a}),e.$set(c),d&7){s=a[1];let t;for(t=0;t<s.length;t+=1){const m=w(a,s,t);i[t]?i[t].p(m,d):(i[t]=y(m),i[t].c(),i[t].m(f,null))}for(;t<i.length;t+=1)i[t].d(1);i.length=s.length}},i(a){o||(z(e.$$.fragment,a),o=!0)},o(a){D(e.$$.fragment,a),o=!1},d(a){a&&g(l),G(e),K(i,a)}}}function N(n,l,e){let{value:u}=l,{choices:f}=l,{disabled:o=!1}=l,{label:s}=l,{style:i=""}=l;const a=O(),d=[[]];function c(){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,o=t.disabled),"label"in t&&e(3,s=t.label),"style"in t&&e(4,i=t.style)},n.$$.update=()=>{n.$$.dirty&1&&a("change",u)},[u,f,o,s,i,c,d]}class P extends k{constructor(l){super(),R(this,l,N,M,C,{value:0,choices:1,disabled:2,label:3,style:4})}}function Q(n){let l,e,u;function f(s){n[6](s)}let o={label:n[1],style:n[2],choices:n[3],disabled:n[4]==="static"};return n[0]!==void 0&&(o.value=n[0]),l=new P({props:o}),T.push(()=>A(l,"value",f)),l.$on("change",n[7]),{c(){j(l.$$.fragment)},m(s,i){q(l,s,i),u=!0},p(s,[i]){const a={};i&2&&(a.label=s[1]),i&4&&(a.style=s[2]),i&8&&(a.choices=s[3]),i&16&&(a.disabled=s[4]==="static"),!e&&i&1&&(e=!0,a.value=s[0],F(()=>e=!1)),l.$set(a)},i(s){u||(z(l.$$.fragment,s),u=!0)},o(s){D(l.$$.fragment,s),u=!1},d(s){G(l,s)}}}function U(n,l,e){let{label:u="Radio"}=l,{value:f=""}=l,{default_value:o}=l,{style:s=""}=l,{choices:i=[]}=l,{mode:a}=l;o&&(f=o);function d(t){f=t,e(0,f)}function c(t){I.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,o=t.default_value),"style"in t&&e(2,s=t.style),"choices"in t&&e(3,i=t.choices),"mode"in t&&e(4,a=t.mode)},[f,u,s,i,a,o,d,c]}class V extends k{constructor(l){super(),R(this,l,U,Q,C,{label:1,value:0,default_value:5,style:2,choices:3,mode:4})}}var Y=V;const Z=["static","dynamic"];export{Y as Component,Z as modes};
