const e=require("../../_util/cssinjs/Keyframes.js"),t=require("../../style/index.js"),n=require("../../theme/util/genComponentStyleHook.js"),r=require("../../theme/util/statistic.js"),i=require("../../style/motion/motion.js"),a=require("../../style/motion/fade.js"),o=require("../util.js");var s=t=>{let{componentCls:n,floatButtonSize:r,motionDurationSlow:a,motionEaseInOutCirc:o}=t,s=`${n}-group`,c=new e.default(`antFloatButtonMoveDownIn`,{"0%":{transform:`translate3d(0, ${r}px, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),l=new e.default(`antFloatButtonMoveDownOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, ${r}px, 0)`,transformOrigin:`0 0`,opacity:0}});return[{[`${s}-wrap`]:{...i.initMotion(`${s}-wrap`,c,l,a,!0)}},{[`${s}-wrap`]:{[`
          &${s}-wrap-enter,
          &${s}-wrap-appear
        `]:{opacity:0,animationTimingFunction:o},[`&${s}-wrap-leave`]:{animationTimingFunction:o}}}]},c=e=>{let{antCls:n,componentCls:r,floatButtonSize:i,margin:a,borderRadiusLG:o,borderRadiusSM:s,badgeOffset:c,floatButtonBodyPadding:l}=e,u=`${r}-group`;return{[u]:{...t.resetComponent(e),zIndex:99,display:`block`,border:`none`,position:`fixed`,width:i,height:`auto`,boxShadow:`none`,minHeight:i,insetInlineEnd:e.floatButtonInsetInlineEnd,insetBlockEnd:e.floatButtonInsetBlockEnd,borderRadius:o,[`${u}-wrap`]:{zIndex:-1,display:`block`,position:`relative`,marginBottom:a},[`&${u}-rtl`]:{direction:`rtl`},[r]:{position:`static`}},[`${u}-circle`]:{[`${r}-circle:not(:last-child)`]:{marginBottom:e.margin,[`${r}-body`]:{width:i,height:i,borderRadius:`50%`}}},[`${u}-square`]:{[`${r}-square`]:{borderRadius:0,padding:0,"&:first-child":{borderStartStartRadius:o,borderStartEndRadius:o},"&:last-child":{borderEndStartRadius:o,borderEndEndRadius:o},"&:not(:last-child)":{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${n}-badge`]:{[`${n}-badge-count`]:{top:-(l+c),insetInlineEnd:-(l+c)}}},[`${u}-wrap`]:{display:`block`,borderRadius:o,boxShadow:e.boxShadowSecondary,[`${r}-square`]:{boxShadow:`none`,marginTop:0,borderRadius:0,padding:l,"&:first-child":{borderStartStartRadius:o,borderStartEndRadius:o},"&:last-child":{borderEndStartRadius:o,borderEndEndRadius:o},"&:not(:last-child)":{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${r}-body`]:{width:e.floatButtonBodySize,height:e.floatButtonBodySize}}}},[`${u}-circle-shadow`]:{boxShadow:`none`},[`${u}-square-shadow`]:{boxShadow:e.boxShadowSecondary,[`${r}-square`]:{boxShadow:`none`,padding:l,[`${r}-body`]:{width:e.floatButtonBodySize,height:e.floatButtonBodySize,borderRadius:s}}}}},l=e=>{let{antCls:n,componentCls:r,floatButtonBodyPadding:i,floatButtonIconSize:a,floatButtonSize:o,borderRadiusLG:s,badgeOffset:c,dotOffsetInSquare:l,dotOffsetInCircle:u}=e;return{[r]:{...t.resetComponent(e),border:`none`,position:`fixed`,cursor:`pointer`,zIndex:99,display:`block`,justifyContent:`center`,alignItems:`center`,width:o,height:o,insetInlineEnd:e.floatButtonInsetInlineEnd,insetBlockEnd:e.floatButtonInsetBlockEnd,boxShadow:e.boxShadowSecondary,"&-pure":{position:`relative`,inset:`auto`},"&:empty":{display:`none`},[`${n}-badge`]:{width:`100%`,height:`100%`,[`${n}-badge-count`]:{transform:`translate(0, 0)`,transformOrigin:`center`,top:-c,insetInlineEnd:-c}},[`${r}-body`]:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all ${e.motionDurationMid}`,[`${r}-content`]:{overflow:`hidden`,textAlign:`center`,minHeight:o,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,padding:`${i/2}px ${i}px`,[`${r}-icon`]:{textAlign:`center`,margin:`auto`,width:a,fontSize:a,lineHeight:1}}}},[`${r}-rtl`]:{direction:`rtl`},[`${r}-circle`]:{height:o,borderRadius:`50%`,[`${n}-badge`]:{[`${n}-badge-dot`]:{top:u,insetInlineEnd:u}},[`${r}-body`]:{borderRadius:`50%`}},[`${r}-square`]:{height:`auto`,minHeight:o,borderRadius:s,[`${n}-badge`]:{[`${n}-badge-dot`]:{top:l,insetInlineEnd:l}},[`${r}-body`]:{height:`auto`,borderRadius:s}},[`${r}-default`]:{backgroundColor:e.floatButtonBackgroundColor,transition:`background-color ${e.motionDurationMid}`,[`${r}-body`]:{backgroundColor:e.floatButtonBackgroundColor,transition:`background-color ${e.motionDurationMid}`,"&:hover":{backgroundColor:e.colorFillContent},[`${r}-content`]:{[`${r}-icon`]:{color:e.colorText},[`${r}-description`]:{display:`flex`,alignItems:`center`,lineHeight:`${e.fontSizeLG}px`,color:e.colorText,fontSize:e.fontSizeSM}}}},[`${r}-primary`]:{backgroundColor:e.colorPrimary,[`${r}-body`]:{backgroundColor:e.colorPrimary,transition:`background-color ${e.motionDurationMid}`,"&:hover":{backgroundColor:e.colorPrimaryHover},[`${r}-content`]:{[`${r}-icon`]:{color:e.colorTextLightSolid},[`${r}-description`]:{display:`flex`,alignItems:`center`,lineHeight:`${e.fontSizeLG}px`,color:e.colorTextLightSolid,fontSize:e.fontSizeSM}}}}}},u=n.default(`FloatButton`,e=>{let{colorTextLightSolid:t,colorBgElevated:n,controlHeightLG:i,marginXXL:u,marginLG:d,fontSize:f,fontSizeIcon:p,controlItemBgHover:m,paddingXXS:h,borderRadiusLG:g}=e,_=r.merge(e,{floatButtonBackgroundColor:n,floatButtonColor:t,floatButtonHoverBackgroundColor:m,floatButtonFontSize:f,floatButtonIconSize:p*1.5,floatButtonSize:i,floatButtonInsetBlockEnd:u,floatButtonInsetInlineEnd:d,floatButtonBodySize:i-h*2,floatButtonBodyPadding:h,badgeOffset:h*1.5,dotOffsetInCircle:o.default(i/2),dotOffsetInSquare:o.default(g)});return[c(_),l(_),a.initFadeMotion(e),s(_)]});exports.default=u;