import{bs as T,bt as K,C as L,bu as M,K as W,I as D,O as l,L as I,d as P,k as F,E as U,U as V,x as y,N as k,G as $,z as c,c as E,p as A}from"./main-74e469cd.js";import{A as H,R as O,r as G}from"./useFlexGapSupport-72f2e7e7.js";function re(a){return T(a)||K(a)||L(a)||M()}var B=Symbol("rowContextKey"),q=function(r){W(B,r)},z=function(){return D(B,{gutter:l(function(){}),wrap:l(function(){}),supportFlexGap:l(function(){})})};const J=q;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}}},X=P({compatConfig:{MODE:3},name:"ARow",props:Q(),setup:function(r,N){var g=N.slots,v=F("row",r),d=v.prefixCls,_=v.direction,j,b=U({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0}),w=H();V(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)})}),k(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 o=0;o<G.length;o++){var p=G[o];if(b.value[p]&&i[p]!==void 0){e[x]=i[p];break}}else e[x]=i||0}),e});J({gutter:S,supportFlexGap:w,wrap:l(function(){return r.wrap})});var h=l(function(){var e;return $(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 E("div",{class:h.value,style:R.value},[(e=g.default)===null||e===void 0?void 0:e.call(g)])}}});const ne=X;function Y(a){return typeof a=="number"?"".concat(a," ").concat(a," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(a)?"0 0 ".concat(a):a}var Z=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 ae=P({compatConfig:{MODE:3},name:"ACol",props:Z(),setup:function(r,N){var g=N.slots,v=z(),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,o=w.value,p={};return["xs","sm","md","lg","xl","xxl","xxxl"].forEach(function(m){var f,u={},C=r[m];typeof C=="number"?u.span=C:y(C)==="object"&&(u=C||{}),p=A(A({},p),{},(f={},c(f,"".concat(o,"-").concat(m,"-").concat(u.span),u.span!==void 0),c(f,"".concat(o,"-").concat(m,"-order-").concat(u.order),u.order||u.order===0),c(f,"".concat(o,"-").concat(m,"-offset-").concat(u.offset),u.offset||u.offset===0),c(f,"".concat(o,"-").concat(m,"-push-").concat(u.push),u.push||u.push===0),c(f,"".concat(o,"-").concat(m,"-pull-").concat(u.pull),u.pull||u.pull===0),c(f,"".concat(o,"-rtl"),S.value==="rtl"),f))}),$(o,(e={},c(e,"".concat(o,"-").concat(t),t!==void 0),c(e,"".concat(o,"-order-").concat(n),n),c(e,"".concat(o,"-offset-").concat(s),s),c(e,"".concat(o,"-push-").concat(i),i),c(e,"".concat(o,"-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=Y(e),j.value===!1&&!n.minWidth&&(n.minWidth=0)),n});return function(){var e;return E("div",{class:h.value,style:R.value},[(e=g.default)===null||e===void 0?void 0:e.call(g)])}}});export{ae as C,ne as R,re as _};
