import{c as m,i as G,m as F,R as f,h as N,d9 as p,z as E}from"./main-fine-mails-rush.js";const u=["wrap","nowrap","wrap-reverse"],d=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],y=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],P=(e,t)=>{const s=t.wrap===!0?"wrap":t.wrap;return{[`${e}-wrap-${s}`]:s&&u.includes(s)}},V=(e,t)=>{const s={};return y.forEach(n=>{s[`${e}-align-${n}`]=t.align===n}),s[`${e}-align-stretch`]=!t.align&&!!t.vertical,s},I=(e,t)=>{const s={};return d.forEach(n=>{s[`${e}-justify-${n}`]=t.justify===n}),s};function W(e,t){return m(Object.assign(Object.assign(Object.assign({},P(e,t)),V(e,t)),I(e,t)))}const z=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},L=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},R=e=>{const{componentCls:t}=e,s={};return u.forEach(n=>{s[`${t}-wrap-${n}`]={flexWrap:n}}),s},A=e=>{const{componentCls:t}=e,s={};return y.forEach(n=>{s[`${t}-align-${n}`]={alignItems:n}}),s},D=e=>{const{componentCls:t}=e,s={};return d.forEach(n=>{s[`${t}-justify-${n}`]={justifyContent:n}}),s},J=()=>({}),M=G("Flex",e=>{const{paddingXS:t,padding:s,paddingLG:n}=e,a=F(e,{flexGapSM:t,flexGap:s,flexGapLG:n});return[z(a),L(a),R(a),A(a),D(a)]},J,{resetStyle:!1});var T=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(s[n[a]]=e[n[a]]);return s};const H=f.forwardRef((e,t)=>{const{prefixCls:s,rootClassName:n,className:a,style:x,flex:g,gap:o,vertical:c=!1,component:C="div"}=e,S=T(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component"]),{flex:l,direction:j,getPrefixCls:v}=f.useContext(N),r=v("flex",s),[w,$,b]=M(r),h=c??(l==null?void 0:l.vertical),O=m(a,n,l==null?void 0:l.className,r,$,b,W(r,e),{[`${r}-rtl`]:j==="rtl",[`${r}-gap-${o}`]:p(o),[`${r}-vertical`]:h}),i=Object.assign(Object.assign({},l==null?void 0:l.style),x);return g&&(i.flex=g),o&&!p(o)&&(i.gap=o),w(f.createElement(C,Object.assign({ref:t,className:O,style:i},E(S,["justify","wrap","align"]))))});export{H as F};
