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