import{d as V,N as H,d_ as J,H as o,r as N,J as L,O as M,U as v,av as U,f as p,bu as W,R as O,cR as x,a5 as R,ag as G,aR as q}from"./registerWidgets.9fce82a0.js";import{u as K}from"./Title.26974edb.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]="ec6da3ef-6ff8-4f37-9956-f5565cd856f7",e._sentryDebugIdIdentifier="sentry-dbid-ec6da3ef-6ff8-4f37-9956-f5565cd856f7")}catch{}})();const Q={small:8,middle:16,large:24},X=()=>({prefixCls:String,size:{type:[String,Number,Array]},direction:R.oneOf(G("horizontal","vertical")).def("horizontal"),align:R.oneOf(G("start","end","center","baseline")),wrap:q()});function Y(e){return typeof e=="string"?Q[e]:e||0}const r=V({compatConfig:{MODE:3},name:"ASpace",inheritAttrs:!1,props:X(),slots:Object,setup(e,c){let{slots:l,attrs:m}=c;const{prefixCls:n,space:g,direction:h}=H("space",e),[j,B]=J(n),z=K(),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),E=o(()=>M(n.value,B.value,`${n.value}-${e.direction}`,{[`${n.value}-rtl`]:h.value==="rtl",[`${n.value}-align-${$.value}`]:$.value})),F=o(()=>h.value==="rtl"?"marginLeft":"marginRight"),k=o(()=>{const t={};return z.value&&(t.columnGap=`${y.value}px`,t.rowGap=`${u.value}px`),v(v({},t),e.wrap&&{flexWrap:"wrap",marginBottom:`${-u.value}px`})});return()=>{var t,a;const{wrap:i,direction:P="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,S=C-1;return p("div",O(O({},m),{},{class:[E.value,m.class],style:[k.value,m.style]}),[_.map((D,b)=>{const T=w.indexOf(D);let f={};return z.value||(P==="vertical"?b<S&&(f={marginBottom:`${A/(d?2:1)}px`}):f=v(v({},b<S&&{[F.value]:`${A/(d?2:1)}px`}),i&&{paddingBottom:`${u.value}px`})),j(p(W,{key:T},[p("div",{class:I,style:f},[D]),b<S&&d&&p("span",{class:`${I}-split`,style:f},[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.e8158c16.js.map
