import e from"../_util/classNames.mjs";import t from"../vc-resize-observer/index.mjs";import n from"../_util/vue-types/index.mjs";import{computed as r,createVNode as i,defineComponent as a,onUnmounted as o,ref as s}from"vue";var c=void 0,l=a({compatConfig:{MODE:3},name:`Item`,props:{prefixCls:String,item:n.any,renderItem:Function,responsive:Boolean,itemKey:{type:[String,Number]},registerSize:Function,display:Boolean,order:Number,component:n.any,invalidate:Boolean},setup(n,{slots:a,expose:l}){let u=r(()=>n.responsive&&!n.display),d=s();l({itemNodeRef:d});function f(e){n.registerSize(n.itemKey,e)}return o(()=>{f(null)}),()=>{let{prefixCls:r,invalidate:o,item:s,renderItem:l,responsive:p,registerSize:m,itemKey:h,display:g,order:_,component:v=`div`,...y}=n,b=a.default?.(),x=l&&s!==c?l(s):b,S;o||(S={opacity:+!u.value,height:u.value?0:c,overflowY:u.value?`hidden`:c,order:p?_:c,pointerEvents:u.value?`none`:c,position:u.value?`absolute`:c});let C={};return u.value&&(C[`aria-hidden`]=!0),i(t,{disabled:!p,onResize:({offsetWidth:e})=>{f(e)}},{default:()=>i(v,{class:e(!o&&r),style:S,...C,...y,ref:d},{default:()=>[x]})})}}});export{l as default};