import{ay as c,B as m,ax as p,b0 as g,j as d,H as x,aY as y,bS as h,bj as u}from"./_plugin-vue_export-helper.js";import{ap as v,X as b}from"./main.js";import{g as j}from"./get-slot.js";function w(){return v}const R={name:"Flex",self:w},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}}),_=m({name:"Flex",props:z,setup(r){const{mergedClsPrefixRef:t,mergedRtlRef:l}=p(r),a=c("Flex","-flex",void 0,R,r,t);return{rtlEnabled:g("Flex",l,t),mergedClsPrefix:t,margin:d(()=>{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:{[y("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=b(j(this),!1);return f.length?x("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{_};
