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