import{d as T,N as H,ds as J,H as o,r as N,J as L,O as M,V as p,b8 as W,f as m,b9 as q,R as O,cG as x,a6 as G,bA as j,aI as K}from"./outputWidgets.d6334d0e.js";import{u as Q}from"./transButton.97ae4a5a.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]="b769d726-ed67-42ea-90b1-5b5236ed9c60",e._sentryDebugIdIdentifier="sentry-dbid-b769d726-ed67-42ea-90b1-5b5236ed9c60")}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:K()});function Y(e){return typeof e=="string"?U[e]:e||0}const r=T({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:h}=H("space",e),[B,E]=J(n),z=Q(),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();L(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),F=o(()=>M(n.value,E.value,`${n.value}-${e.direction}`,{[`${n.value}-rtl`]:h.value==="rtl",[`${n.value}-align-${$.value}`]:$.value})),R=o(()=>h.value==="rtl"?"marginLeft":"marginRight"),V=o(()=>{const t={};return z.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:k="horizontal"}=e,w=(t=l.default)===null||t===void 0?void 0:t.call(l),_=W(w),I=_.length;if(I===0)return null;const d=(a=l.split)===null||a===void 0?void 0:a.call(l),A=`${n.value}-item`,C=y.value,b=I-1;return m("div",O(O({},f),{},{class:[F.value,f.class],style:[V.value,f.style]}),[_.map((D,S)=>{const P=w.indexOf(D);let v={};return z.value||(k==="vertical"?S<b&&(v={marginBottom:`${C/(d?2:1)}px`}):v=p(p({},S<b&&{[R.value]:`${C/(d?2:1)}px`}),i&&{paddingBottom:`${u.value}px`})),B(m(q,{key:P},[m("div",{class:A,style:v},[D]),S<b&&d&&m("span",{class:`${A}-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.6da051f8.js.map
