import{bs as p,g,b7 as m,Q as d,a4 as x,X as c,a8 as h,C as y,ah as b,bt as v,bu as u}from"./Czresmtb.js";import{g as w}from"./Bk_rJcZu.js";function C(){return p}const R={self:C},z=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}}),B=g({name:"Flex",props:z,setup(r){const{mergedClsPrefixRef:t,mergedRtlRef:l}=x(r),a=c("Flex","-flex",void 0,R,r,t);return{rtlEnabled:h("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:{[b("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=m(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{B as _};
