import{d as R,L as T,dr as V,G as o,r as N,H as M,N as Q,U as p,b7 as U,f as m,b8 as W,Q as G,cF as x,a5 as O,bz as F,aH as q}from"./outputWidgets.0fb707c7.js";import{u as J}from"./transButton.220177fb.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]="087a0c61-c131-4497-93d2-60744b3993d8",e._sentryDebugIdIdentifier="sentry-dbid-087a0c61-c131-4497-93d2-60744b3993d8")}catch{}})();const K={small:8,middle:16,large:24},X=()=>({prefixCls:String,size:{type:[String,Number,Array]},direction:O.oneOf(F("horizontal","vertical")).def("horizontal"),align:O.oneOf(F("start","end","center","baseline")),wrap:q()});function Y(e){return typeof e=="string"?K[e]:e||0}const r=R({compatConfig:{MODE:3},name:"ASpace",inheritAttrs:!1,props:X(),slots:Object,setup(e,c){let{slots:l,attrs:f}=c;const{prefixCls:n,space:g,direction:z}=T("space",e),[j,B]=V(n),h=J(),s=o(()=>{var t,a,i;return(i=(t=e.size)!==null&&t!==void 0?t:(a=g==null?void 0:g.value)===null||a===void 0?void 0:a.size)!==null&&i!==void 0?i:"small"}),y=N(),u=N();M(s,()=>{[y.value,u.value]=(Array.isArray(s.value)?s.value:[s.value,s.value]).map(t=>Y(t))},{immediate:!0});const $=o(()=>e.align===void 0&&e.direction==="horizontal"?"center":e.align),E=o(()=>Q(n.value,B.value,`${n.value}-${e.direction}`,{[`${n.value}-rtl`]:z.value==="rtl",[`${n.value}-align-${$.value}`]:$.value})),k=o(()=>z.value==="rtl"?"marginLeft":"marginRight"),H=o(()=>{const t={};return h.value&&(t.columnGap=`${y.value}px`,t.rowGap=`${u.value}px`),p(p({},t),e.wrap&&{flexWrap:"wrap",marginBottom:`${-u.value}px`})});return()=>{var t,a;const{wrap:i,direction:L="horizontal"}=e,w=(t=l.default)===null||t===void 0?void 0:t.call(l),_=U(w),C=_.length;if(C===0)return null;const d=(a=l.split)===null||a===void 0?void 0:a.call(l),I=`${n.value}-item`,A=y.value,b=C-1;return m("div",G(G({},f),{},{class:[E.value,f.class],style:[H.value,f.style]}),[_.map((D,S)=>{const P=w.indexOf(D);let v={};return h.value||(L==="vertical"?S<b&&(v={marginBottom:`${A/(d?2:1)}px`}):v=p(p({},S<b&&{[k.value]:`${A/(d?2:1)}px`}),i&&{paddingBottom:`${u.value}px`})),j(m(W,{key:P},[m("div",{class:I,style:v},[D]),S<b&&d&&m("span",{class:`${I}-split`,style:v},[d])]))})])}}});r.Compact=x;r.install=function(e){return e.component(r.name,r),e.component(x.name,x),e};const te=r;export{te as A};
//# sourceMappingURL=index.a2e845fd.js.map
