import{d as R,a9 as T,dJ as V,dK as J,g as o,f as N,h as M,aK as W,b as p,G as m,aL as q,ac as O,cP as h,ao as j,bn as B,aG as H,aa as Q}from"./index.e310aebb.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]="8eacb298-4e67-40f5-9f65-a57d64cf399f",e._sentryDebugIdIdentifier="sentry-dbid-8eacb298-4e67-40f5-9f65-a57d64cf399f")}catch{}})();const U={small:8,middle:16,large:24},X=()=>({prefixCls:String,size:{type:[String,Number,Array]},direction:j.oneOf(B("horizontal","vertical")).def("horizontal"),align:j.oneOf(B("start","end","center","baseline")),wrap:H()});function Y(e){return typeof e=="string"?U[e]:e||0}const r=R({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}=T("space",e),[E,F]=V(n),z=J(),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=N(),u=N();M(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),P=o(()=>Q(n.value,F.value,`${n.value}-${e.direction}`,{[`${n.value}-rtl`]:x.value==="rtl",[`${n.value}-align-${w.value}`]:w.value})),k=o(()=>x.value==="rtl"?"marginLeft":"marginRight"),K=o(()=>{const a={};return z.value&&(a.columnGap=`${b.value}px`,a.rowGap=`${u.value}px`),m(m({},a),e.wrap&&{flexWrap:"wrap",marginBottom:`${-u.value}px`})});return()=>{var a,t;const{wrap:i,direction:L="horizontal"}=e,_=(a=l.default)===null||a===void 0?void 0:a.call(l),C=W(_),I=C.length;if(I===0)return null;const d=(t=l.split)===null||t===void 0?void 0:t.call(l),A=`${n.value}-item`,D=b.value,S=I-1;return p("div",O(O({},g),{},{class:[P.value,g.class],style:[K.value,g.style]}),[C.map((G,f)=>{let $=_.indexOf(G);$===-1&&($=`$$space-${f}`);let v={};return z.value||(L==="vertical"?f<S&&(v={marginBottom:`${D/(d?2:1)}px`}):v=m(m({},f<S&&{[k.value]:`${D/(d?2:1)}px`}),i&&{paddingBottom:`${u.value}px`})),E(p(q,{key:$},[p("div",{class:A,style:v},[G]),f<S&&d&&p("span",{class:`${A}-split`,style:v},[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.3d882fa8.js.map
