import e from"../_util/classNames.mjs";import t from"../_util/props-util/initDefaultProps.mjs";import n from"../config-provider/hooks/useConfigInject.mjs";import r from"../button/index.mjs";import{dropdownButtonProps as i}from"./props.mjs";import a from"./style/index.mjs";import o from"./dropdown.mjs";import{computed as s,createVNode as c,defineComponent as l}from"vue";import{EllipsisOutlined as u}from"@antsoo-lib/icons";var d=r.Group,f=l({compatConfig:{MODE:3},name:`ADropdownButton`,inheritAttrs:!1,__ANT_BUTTON:!0,props:t(i(),{trigger:`hover`,placement:`bottomRight`,type:`default`}),slots:Object,setup(t,{slots:i,attrs:l,emit:f}){let p=e=>{f(`update:visible`,e),f(`visibleChange`,e),f(`update:open`,e),f(`openChange`,e)},{prefixCls:m,direction:h,getPopupContainer:g}=n(`dropdown`,t),_=s(()=>`${m.value}-button`),[v,y]=a(m);return()=>{let{type:n=`default`,disabled:a,danger:s,loading:f,htmlType:m,class:b=``,overlay:x=i.overlay?.(),trigger:S,align:C,open:w,visible:T,onVisibleChange:E,placement:D=h.value===`rtl`?`bottomLeft`:`bottomRight`,href:O,title:k,icon:A=i.icon?.()||c(u,null,null),mouseEnterDelay:j,mouseLeaveDelay:M,overlayClassName:N,overlayStyle:P,destroyPopupOnHide:F,onClick:I,"onUpdate:open":L,...R}={...t,...l},z={align:C,disabled:a,trigger:a?[]:S,placement:D,getPopupContainer:g?.value,onOpenChange:p,mouseEnterDelay:j,mouseLeaveDelay:M,open:w??T,overlayClassName:N,overlayStyle:P,destroyPopupOnHide:F},B=c(r,{danger:s,type:n,disabled:a,loading:f,onClick:I,htmlType:m,href:O,title:k},{default:i.default}),V=c(r,{danger:s,type:n,icon:A},null);return v(c(d,{...R,class:e(_.value,b,y.value)},{default:()=>[i.leftButton?i.leftButton({button:B}):B,c(o,z,{default:()=>[i.rightButton?i.rightButton({button:V}):V],overlay:()=>x})]}))}}});export{f as default};