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