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