import{d as V,a1 as L,dD as M,dE as W,f as o,e as O,g as q,a2 as H,a6 as f,aC as J,b as m,aD as K,a4 as E,cD as h,ag as G,bh as j,ay as Q}from"./vue-router.637ad36e.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},c=new Error().stack;c&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[c]="be7e859d-51a8-4c6e-b93d-6a8410845f11",e._sentryDebugIdIdentifier="sentry-dbid-be7e859d-51a8-4c6e-b93d-6a8410845f11")}catch{}})();const U={small:8,middle:16,large:24},X=()=>({prefixCls:String,size:{type:[String,Number,Array]},direction:G.oneOf(j("horizontal","vertical")).def("horizontal"),align:G.oneOf(j("start","end","center","baseline")),wrap:Q()});function Y(e){return typeof e=="string"?U[e]:e||0}const r=V({compatConfig:{MODE:3},name:"ASpace",inheritAttrs:!1,props:X(),slots:Object,setup(e,c){let{slots:l,attrs:g}=c;const{prefixCls:n,space:y,direction:x}=L("space",e),[B,F]=M(n),z=W(),s=o(()=>{var a,t,i;return(i=(a=e.size)!==null&&a!==void 0?a:(t=y==null?void 0:y.value)===null||t===void 0?void 0:t.size)!==null&&i!==void 0?i:"small"}),b=O(),u=O();q(s,()=>{[b.value,u.value]=(Array.isArray(s.value)?s.value:[s.value,s.value]).map(a=>Y(a))},{immediate:!0});const w=o(()=>e.align===void 0&&e.direction==="horizontal"?"center":e.align),k=o(()=>H(n.value,F.value,`${n.value}-${e.direction}`,{[`${n.value}-rtl`]:x.value==="rtl",[`${n.value}-align-${w.value}`]:w.value})),P=o(()=>x.value==="rtl"?"marginLeft":"marginRight"),R=o(()=>{const a={};return z.value&&(a.columnGap=`${b.value}px`,a.rowGap=`${u.value}px`),f(f({},a),e.wrap&&{flexWrap:"wrap",marginBottom:`${-u.value}px`})});return()=>{var a,t;const{wrap:i,direction:T="horizontal"}=e,_=(a=l.default)===null||a===void 0?void 0:a.call(l),C=J(_),D=C.length;if(D===0)return null;const d=(t=l.split)===null||t===void 0?void 0:t.call(l),I=`${n.value}-item`,A=b.value,S=D-1;return m("div",E(E({},g),{},{class:[k.value,g.class],style:[R.value,g.style]}),[C.map((N,v)=>{let $=_.indexOf(N);$===-1&&($=`$$space-${v}`);let p={};return z.value||(T==="vertical"?v<S&&(p={marginBottom:`${A/(d?2:1)}px`}):p=f(f({},v<S&&{[P.value]:`${A/(d?2:1)}px`}),i&&{paddingBottom:`${u.value}px`})),B(m(K,{key:$},[m("div",{class:I,style:p},[N]),v<S&&d&&m("span",{class:`${I}-split`,style:p},[d])]))})])}}});r.Compact=h;r.install=function(e){return e.component(r.name,r),e.component(h.name,h),e};const ee=r;export{ee as A};
//# sourceMappingURL=index.faf7cd82.js.map
