import{t as d,y as g,u as b,z as h,d as m,C as E,D as p,c as v,E as N,G as S,x as P}from"./index.28bb778f.js";const[$,_]=d("row"),w=Symbol($),x={tag:g("div"),wrap:b,align:String,gutter:h(0),justify:String};var R=m({name:$,props:x,setup(o,{slots:r}){const{children:l,linkChildren:u}=E(w),i=p(()=>{const e=[[]];let t=0;return l.forEach((a,n)=>{t+=Number(a.span),t>24?(e.push([n]),t-=24):e[e.length-1].push(n)}),e}),s=p(()=>{const e=Number(o.gutter),t=[];return e&&i.value.forEach(a=>{const n=e*(a.length-1)/a.length;a.forEach((c,y)=>{if(y===0)t.push({right:n});else{const f=e-t[c-1].right,C=n-f;t.push({left:f,right:C})}})}),t});return u({spaces:s}),()=>{const{tag:e,wrap:t,align:a,justify:n}=o;return v(e,{class:_({[`align-${a}`]:a,[`justify-${n}`]:n,nowrap:!t})},{default:()=>{var c;return[(c=r.default)==null?void 0:c.call(r)]}})}}});const[j,k]=d("col"),z={tag:g("div"),span:h(0),offset:N};var D=m({name:j,props:z,setup(o,{slots:r}){const{parent:l,index:u}=S(w),i=p(()=>{if(!l)return;const{spaces:s}=l;if(s&&s.value&&s.value[u.value]){const{left:e,right:t}=s.value[u.value];return{paddingLeft:e?`${e}px`:null,paddingRight:t?`${t}px`:null}}});return()=>{const{tag:s,span:e,offset:t}=o;return v(s,{style:i.value,class:k({[e]:e,[`offset-${t}`]:t})},{default:()=>{var a;return[(a=r.default)==null?void 0:a.call(r)]}})}}});const I=P(D),K=P(R);export{I as C,K as R};
