"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../_util/classNames.js"),m=require("../_util/props-util/initDefaultProps.js");require("../badge/index.js");const B=require("../config-provider/hooks/useConfigInject.js"),b=require("../tooltip/index.js"),N=require("./FloatButtonContent.js"),P=require("./context.js"),S=require("./interface.js"),$=require("./style/index.js"),V=require("../badge/Badge.js"),s="float-btn",y=e.defineComponent({compatConfig:{MODE:3},name:"AFloatButton",inheritAttrs:!1,props:m.default(S.floatButtonProps(),{type:"default",shape:"circle"}),setup(r,{attrs:n,slots:o}){const{prefixCls:t,direction:d}=B.default(s,r),[f,p]=$.default(t),{shape:v}=P.useInjectFloatButtonGroupContext(),u=e.ref(null),q=e.computed(()=>v?.value||r.shape);return()=>{const{prefixCls:F,type:C="default",shape:j="circle",description:h=o.description?.(),tooltip:a,badge:x={},...l}=r,c=g.default(t.value,`${t.value}-${C}`,`${t.value}-${q.value}`,{[`${t.value}-rtl`]:d.value==="rtl"},n.class,p.value),i=e.createVNode(b.default,{placement:"left"},{title:o.tooltip||a?()=>o.tooltip&&o.tooltip()||a:void 0,default:()=>e.createVNode(V.default,x,{default:()=>[e.createVNode("div",{class:`${t.value}-body`},[e.createVNode(N.default,{prefixCls:t.value},{icon:o.icon,description:()=>h})])]})});return f(r.href?e.createVNode("a",{ref:u,...n,...l,class:c},[i]):e.createVNode("button",{ref:u,...n,...l,class:c,type:"button"},[i]))}}});exports.default=y;exports.floatButtonPrefixCls=s;
