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