import{d as V,O as W,d_ as q,J as o,r as O,K as J,Q as K,W as p,ax as L,f as m,bq as M,U as N,cR as x,a7 as G,ai as j,a_ as Q}from"./outputWidgets.52de64cd.js";import{u as U}from"./Title.baba2b21.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]="6a2b5eba-83e1-4ec7-8814-8b29aa8d66cc",e._sentryDebugIdIdentifier="sentry-dbid-6a2b5eba-83e1-4ec7-8814-8b29aa8d66cc")}catch{}})();const H={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:Q()});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),[B,E]=q(n),z=U(),s=o(()=>{var a,t,i;return(i=(a=e.size)!==null&&a!==void 0?a:(t=g==null?void 0:g.value)===null||t===void 0?void 0:t.size)!==null&&i!==void 0?i:"small"}),y=O(),u=O();J(s,()=>{[y.value,u.value]=(Array.isArray(s.value)?s.value:[s.value,s.value]).map(a=>Y(a))},{immediate:!0});const _=o(()=>e.align===void 0&&e.direction==="horizontal"?"center":e.align),F=o(()=>K(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"),k=o(()=>{const a={};return z.value&&(a.columnGap=`${y.value}px`,a.rowGap=`${u.value}px`),p(p({},a),e.wrap&&{flexWrap:"wrap",marginBottom:`${-u.value}px`})});return()=>{var a,t;const{wrap:i,direction:P="horizontal"}=e,$=(a=l.default)===null||a===void 0?void 0:a.call(l),w=L($),C=w.length;if(C===0)return null;const d=(t=l.split)===null||t===void 0?void 0:t.call(l),I=`${n.value}-item`,A=y.value,b=C-1;return m("div",N(N({},f),{},{class:[F.value,f.class],style:[k.value,f.style]}),[w.map((D,S)=>{const T=$.indexOf(D);let v={};return z.value||(P==="vertical"?S<b&&(v={marginBottom:`${A/(d?2:1)}px`}):v=p(p({},S<b&&{[R.value]:`${A/(d?2:1)}px`}),i&&{paddingBottom:`${u.value}px`})),B(m(M,{key:T},[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 ae=r;export{ae as A};
//# sourceMappingURL=index.c0e74c90.js.map
