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