import{bG as m,d as p,bH as g,E as d,F as x,H as c,G as y,f as b,aY as h,bI as v,bJ as u}from"./index-DSCno0m2.js";import{g as w}from"./get-slot-Bk_rJcZu.js";function R(){return m}const z={self:R},C=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}}),F=p({name:"Flex",props:C,setup(r){const{mergedClsPrefixRef:t,mergedRtlRef:l}=x(r),a=c("Flex","-flex",void 0,z,r,t);return{rtlEnabled:y("Flex",l,t),mergedClsPrefix:t,margin:b(()=>{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:{[h("gap",e)]:s}}=a.value,{row:n,col:i}=v(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(w(this),!1);return f.length?d("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{F as N};
