"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue"),j=require("../_util/classNames.js"),C=require("../config-provider/hooks/useConfigInject.js"),O=require("./context.js"),q=require("./style/index.js");function P(r){return typeof r=="number"?`${r} ${r} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(r)?`0 0 ${r}`:r}const $=()=>({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},prefixCls:String,flex:[String,Number]}),w=["xs","sm","md","lg","xl","xxl"],G=d.defineComponent({compatConfig:{MODE:3},name:"ACol",inheritAttrs:!1,props:$(),setup(r,{slots:m,attrs:f}){const{gutter:g,supportFlexGap:b,wrap:S}=O.useInjectRow(),{prefixCls:a,direction:h}=C.default("col",r),[x,y]=q.useColStyle(a),N=d.computed(()=>{const{span:l,order:u,offset:n,push:s,pull:c}=r,t=a.value;let p={};return w.forEach(o=>{let e={};const i=r[o];typeof i=="number"?e.span=i:typeof i=="object"&&(e=i||{}),p={...p,[`${t}-${o}-${e.span}`]:e.span!==void 0,[`${t}-${o}-order-${e.order}`]:e.order||e.order===0,[`${t}-${o}-offset-${e.offset}`]:e.offset||e.offset===0,[`${t}-${o}-push-${e.push}`]:e.push||e.push===0,[`${t}-${o}-pull-${e.pull}`]:e.pull||e.pull===0,[`${t}-rtl`]:h.value==="rtl"}}),j.default(t,{[`${t}-${l}`]:l!==void 0,[`${t}-order-${u}`]:u,[`${t}-offset-${n}`]:n,[`${t}-push-${s}`]:s,[`${t}-pull-${c}`]:c},p,f.class,y.value)}),v=d.computed(()=>{const{flex:l}=r,u=g.value,n={};if(u&&u[0]>0){const s=`${u[0]/2}px`;n.paddingLeft=s,n.paddingRight=s}if(u&&u[1]>0&&!b.value){const s=`${u[1]/2}px`;n.paddingTop=s,n.paddingBottom=s}return l&&(n.flex=P(l),S.value===!1&&!n.minWidth&&(n.minWidth=0)),n});return()=>x(d.createVNode("div",{...f,class:N.value,style:[v.value,f.style]},[m.default?.()]))}});exports.colProps=$;exports.default=G;
