import{r as d,y as l,aj as a,B as c,i as t,q as o,z as v}from"./entry.2xM5grDS.js";function f(u){const r=`group-${a().uid}`,n=d({children:[],register(e){this.children.push(e)},unregister(e){const i=this.children.indexOf(e);i>-1&&this.children.splice(i,1)},...u});l(r,n)}function p({ui:u,props:s}){const r=a();let n=r.parent,e;for(;n&&!e;){if(n.type.name==="ButtonGroup"){e=c(`group-${n.uid}`);break}n=n.parent}const i=t(()=>e==null?void 0:e.value.children.indexOf(r));return o(()=>{e==null||e.value.register(r)}),v(()=>{e==null||e.value.unregister(r)}),{size:t(()=>(e==null?void 0:e.value.size)||s.size),rounded:t(()=>!e||i.value===-1?u.value.rounded:e.value.children.length===1?e.value.ui.rounded:i.value===0?e.value.rounded.start:i.value===e.value.children.length-1?e.value.rounded.end:"rounded-none")}}export{p as a,f as u};
