import{d as V,O as W,e0 as J,J as o,r as O,K,Q as L,W as p,ax as M,f as m,bw as Q,U as N,cT as x,a7 as G,ai as T,aT as U}from"./outputWidgets.b9aa154a.js";import{u as q}from"./Title.6cd833fd.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]="5e2c56cc-b212-4cb0-877e-88f22621d34e",e._sentryDebugIdIdentifier="sentry-dbid-5e2c56cc-b212-4cb0-877e-88f22621d34e")}catch{}})();const H={small:8,middle:16,large:24},X=()=>({prefixCls:String,size:{type:[String,Number,Array]},direction:G.oneOf(T("horizontal","vertical")).def("horizontal"),align:G.oneOf(T("start","end","center","baseline")),wrap:U()});function Y(e){return typeof e=="string"?H[e]:e||0}const r=V({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}=W("space",e),[j,B]=J(n),w=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=O(),u=O();K(s,()=>{[y.value,u.value]=(Array.isArray(s.value)?s.value:[s.value,s.value]).map(t=>Y(t))},{immediate:!0});const z=o(()=>e.align===void 0&&e.direction==="horizontal"?"center":e.align),E=o(()=>L(n.value,B.value,`${n.value}-${e.direction}`,{[`${n.value}-rtl`]:h.value==="rtl",[`${n.value}-align-${z.value}`]:z.value})),F=o(()=>h.value==="rtl"?"marginLeft":"marginRight"),k=o(()=>{const t={};return w.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:P="horizontal"}=e,$=(t=l.default)===null||t===void 0?void 0:t.call(l),_=M($),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",N(N({},f),{},{class:[E.value,f.class],style:[k.value,f.style]}),[_.map((D,S)=>{const R=$.indexOf(D);let v={};return w.value||(P==="vertical"?S<b&&(v={marginBottom:`${A/(d?2:1)}px`}):v=p(p({},S<b&&{[F.value]:`${A/(d?2:1)}px`}),i&&{paddingBottom:`${u.value}px`})),j(m(Q,{key:R},[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.6b140cad.js.map
