import{f,O as _,ak as V,N as z,r as G,al as F,am as W,a9 as I,a as B,U as E,an as R,D as b,a7 as $,ao as A,S as K,J as e,j as L,_ as O}from"./index.bde7963b.js";var T=Symbol("SizeProvider"),Z=function(t){var u=_("configProvider",V),g=f(function(){return t.size||u.componentSize});return z(T,g),g},ll=function(t){var u=t?f(function(){return t.size}):_(T,f(function(){return"default"}));return u},D=function(){var n=G(!1);return F(function(){n.value=W()}),n},U=Symbol("rowContextKey"),J=function(t){z(U,t)},M=function(){return _(U,{gutter:f(function(){}),wrap:f(function(){}),supportFlexGap:f(function(){})})};I("top","middle","bottom","stretch");I("start","end","center","space-around","space-between");var q=function(){return{align:String,justify:String,prefixCls:String,gutter:{type:[Number,Array,Object],default:0},wrap:{type:Boolean,default:void 0}}},H=B({name:"ARow",props:q(),setup:function(t,u){var g=u.slots,p=E("row",t),h=p.prefixCls,N=p.direction,k,w=G({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0}),v=D();F(function(){k=R.subscribe(function(l){var a=t.gutter||0;(!Array.isArray(a)&&b(a)==="object"||Array.isArray(a)&&(b(a[0])==="object"||b(a[1])==="object"))&&(w.value=l)})}),$(function(){R.unsubscribe(k)});var j=f(function(){var l=[0,0],a=t.gutter,o=a===void 0?0:a,i=Array.isArray(o)?o:[o,0];return i.forEach(function(x,y){if(b(x)==="object")for(var r=0;r<A.length;r++){var m=A[r];if(w.value[m]&&x[m]!==void 0){l[y]=x[m];break}}else l[y]=x||0}),l});J({gutter:j,supportFlexGap:v,wrap:f(function(){return t.wrap})});var C=f(function(){var l;return K(h.value,(l={},e(l,"".concat(h.value,"-no-wrap"),t.wrap===!1),e(l,"".concat(h.value,"-").concat(t.justify),t.justify),e(l,"".concat(h.value,"-").concat(t.align),t.align),e(l,"".concat(h.value,"-rtl"),N.value==="rtl"),l))}),P=f(function(){var l=j.value,a={},o=l[0]>0?"".concat(l[0]/-2,"px"):void 0,i=l[1]>0?"".concat(l[1]/-2,"px"):void 0;return o&&(a.marginLeft=o,a.marginRight=o),v.value?a.rowGap="".concat(l[1],"px"):i&&(a.marginTop=i,a.marginBottom=i),a});return function(){var l;return L("div",{class:C.value,style:P.value},[(l=g.default)===null||l===void 0?void 0:l.call(g)])}}}),tl=H;function Q(n){return typeof n=="number"?"".concat(n," ").concat(n," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(n)?"0 0 ".concat(n):n}var X=function(){return{span:[String,Number],order:[String,Number],offset:[String,Number],push:[String,Number],pull:[String,Number],xs:{type:[String,Number,Object],default:void 0},sm:{type:[String,Number,Object],default:void 0},md:{type:[String,Number,Object],default:void 0},lg:{type:[String,Number,Object],default:void 0},xl:{type:[String,Number,Object],default:void 0},xxl:{type:[String,Number,Object],default:void 0},xxxl:{type:[String,Number,Object],default:void 0},prefixCls:String,flex:[String,Number]}},al=B({name:"ACol",props:X(),setup:function(t,u){var g=u.slots,p=M(),h=p.gutter,N=p.supportFlexGap,k=p.wrap,w=E("col",t),v=w.prefixCls,j=w.direction,C=f(function(){var l,a=t.span,o=t.order,i=t.offset,x=t.push,y=t.pull,r=v.value,m={};return["xs","sm","md","lg","xl","xxl","xxxl"].forEach(function(d){var s,c={},S=t[d];typeof S=="number"?c.span=S:b(S)==="object"&&(c=S||{}),m=O(O({},m),(s={},e(s,"".concat(r,"-").concat(d,"-").concat(c.span),c.span!==void 0),e(s,"".concat(r,"-").concat(d,"-order-").concat(c.order),c.order||c.order===0),e(s,"".concat(r,"-").concat(d,"-offset-").concat(c.offset),c.offset||c.offset===0),e(s,"".concat(r,"-").concat(d,"-push-").concat(c.push),c.push||c.push===0),e(s,"".concat(r,"-").concat(d,"-pull-").concat(c.pull),c.pull||c.pull===0),e(s,"".concat(r,"-rtl"),j.value==="rtl"),s))}),K(r,(l={},e(l,"".concat(r,"-").concat(a),a!==void 0),e(l,"".concat(r,"-order-").concat(o),o),e(l,"".concat(r,"-offset-").concat(i),i),e(l,"".concat(r,"-push-").concat(x),x),e(l,"".concat(r,"-pull-").concat(y),y),l),m)}),P=f(function(){var l=t.flex,a=h.value,o={};if(a&&a[0]>0){var i="".concat(a[0]/2,"px");o.paddingLeft=i,o.paddingRight=i}if(a&&a[1]>0&&!N.value){var x="".concat(a[1]/2,"px");o.paddingTop=x,o.paddingBottom=x}return l&&(o.flex=Q(l),k.value===!1&&!o.minWidth&&(o.minWidth=0)),o});return function(){var l;return L("div",{class:C.value,style:P.value},[(l=g.default)===null||l===void 0?void 0:l.call(g)])}}});export{al as C,tl as R,D as a,Z as b,ll as u};
