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"../tooltip/index.mjs";import i from"../badge/index.mjs";import{floatButtonProps as a}from"./interface.mjs";import o from"./FloatButtonContent.mjs";import{useInjectFloatButtonGroupContext as s}from"./context.mjs";import c from"./style/index.mjs";import{computed as l,createVNode as u,defineComponent as d,ref as f}from"vue";var p=`float-btn`,m=d({compatConfig:{MODE:3},name:`AFloatButton`,inheritAttrs:!1,props:t(a(),{type:`default`,shape:`circle`}),setup(t,{attrs:a,slots:d}){let{prefixCls:m,direction:h}=n(p,t),[g,_]=c(m),{shape:v}=s(),y=f(null),b=l(()=>v?.value||t.shape);return()=>{let{prefixCls:n,type:s=`default`,shape:c=`circle`,description:l=d.description?.(),tooltip:f,badge:p={},...v}=t,x=e(m.value,`${m.value}-${s}`,`${m.value}-${b.value}`,{[`${m.value}-rtl`]:h.value===`rtl`},a.class,_.value),S=u(r,{placement:`left`},{title:d.tooltip||f?()=>d.tooltip&&d.tooltip()||f:void 0,default:()=>u(i,p,{default:()=>[u(`div`,{class:`${m.value}-body`},[u(o,{prefixCls:m.value},{icon:d.icon,description:()=>l})])]})});return g(t.href?u(`a`,{ref:y,...a,...v,class:x},[S]):u(`button`,{ref:y,...a,...v,class:x,type:`button`},[S]))}}});export{m as default,p as floatButtonPrefixCls};