const e=require("../_util/type.js"),t=require("../_util/omit.js"),n=require("../config-provider/context.js"),r=require("../config-provider/hooks/useConfigInject.js"),i=require("../_util/gapSize.js"),a=require("./interface.js"),o=require("./utils.js"),s=require("./style/index.js");let c=require("vue");var l=(0,c.defineComponent)({name:`AFlex`,inheritAttrs:!1,props:a.flexProps(),setup(e,{slots:a,attrs:l}){let{flex:u,direction:d}=n.useConfigContextInject(),{prefixCls:f}=r.default(`flex`,e),[p,m]=s.default(f),h=(0,c.computed)(()=>[f.value,m.value,o.default(f.value,e),{[`${f.value}-rtl`]:d.value===`rtl`,[`${f.value}-gap-${e.gap}`]:i.isPresetSize(e.gap),[`${f.value}-vertical`]:e.vertical??u?.value.vertical}]);return()=>{let{flex:n,gap:r,component:o=`div`,...s}=e,u={};return n&&(u.flex=n),r&&!i.isPresetSize(r)&&(u.gap=`${r}px`),p((0,c.createVNode)(o,{class:[l.class,h.value],style:[l.style,u],...t.default(s,[`justify`,`wrap`,`align`,`vertical`])},{default:()=>[a.default?.()]}))}}}),u=e.withInstall(l);exports.default=u;