import{d as p,b5 as g,bt as d,Z as m,a2 as x,a3 as c,bu as b,a4 as y,bv as v,bw as h,bx as u,by as w}from"./index-9PRMimni.js";const R=Object.assign(Object.assign({},c.props),{align:String,justify:{type:String,default:"start"},inline:Boolean,vertical:Boolean,reverse:Boolean,size:{type:[String,Number,Array],default:"medium"},wrap:{type:Boolean,default:!0}}),C=p({name:"Flex",props:R,setup(r){const{mergedClsPrefixRef:t,mergedRtlRef:l}=x(r),a=c("Flex","-flex",void 0,w,r,t);return{rtlEnabled:b("Flex",l,t),mergedClsPrefix:t,margin:y(()=>{const{size:e}=r;if(Array.isArray(e))return{horizontal:e[0],vertical:e[1]};if(typeof e=="number")return{horizontal:e,vertical:e};const{self:{[v("gap",e)]:s}}=a.value,{row:n,col:i}=h(s);return{horizontal:u(i),vertical:u(n)}})}},render(){const{vertical:r,reverse:t,align:l,inline:a,justify:o,margin:e,wrap:s,mergedClsPrefix:n,rtlEnabled:i}=this,f=g(d(this),!1);return f.length?m("div",{role:"none",class:[`${n}-flex`,i&&`${n}-flex--rtl`],style:{display:a?"inline-flex":"flex",flexDirection:r&&!t?"column":r&&t?"column-reverse":!r&&t?"row-reverse":"row",justifyContent:o,flexWrap:!s||r?"nowrap":"wrap",alignItems:l,gap:`${e.vertical}px ${e.horizontal}px`}},f):null}});export{C as _};
