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