import{flattenChildren as e}from"../_util/props-util/index.mjs";import{useToken as t}from"../theme/internal.mjs";import n from"../config-provider/hooks/useConfigInject.mjs";import r from"../vc-util/devWarning.mjs";import i from"../_util/createContext.mjs";import{computed as a,createVNode as o,defineComponent as s,reactive as c}from"vue";var l=()=>({prefixCls:String,size:{type:String}}),u=i(),d=s({compatConfig:{MODE:3},name:`AButtonGroup`,props:l(),setup(i,{slots:s}){let{prefixCls:l,direction:d}=n(`btn-group`,i),[,,f]=t();u.useProvide(c({size:a(()=>i.size)}));let p=a(()=>{let{size:e}=i,t=``;switch(e){case`large`:t=`lg`;break;case`small`:t=`sm`;break;case`middle`:case void 0:break;default:r(!e,`Button.Group`,"Invalid prop `size`.")}return{[`${l.value}`]:!0,[`${l.value}-${t}`]:t,[`${l.value}-rtl`]:d.value===`rtl`,[f.value]:!0}});return()=>o(`div`,{class:p.value},[e(s.default?.())])}});export{u as GroupSizeContext,l as buttonGroupProps,d as default};