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