const e=require("../_util/classNames.js"),t=require("../_util/props-util/index.js"),n=require("../config-provider/hooks/useConfigInject.js"),r=require("../_util/vue-types/index.js"),i=require("../_util/vnode.js"),a=require("../grid/Col.js"),o=require("./ItemMeta.js"),s=require("./contextKey.js");let c=require("vue");var l=()=>({prefixCls:String,extra:r.default.any,actions:r.default.array,grid:Object,colStyle:{type:Object,default:void 0}}),u=(0,c.defineComponent)({compatConfig:{MODE:3},name:`AListItem`,inheritAttrs:!1,Meta:o.default,props:l(),slots:Object,setup(r,{slots:o,attrs:l}){let{itemLayout:u,grid:d}=(0,c.inject)(s.ListContextKey,{grid:(0,c.ref)(),itemLayout:(0,c.ref)()}),{prefixCls:f}=n.default(`list`,r),p=()=>{let e=o.default?.()||[],n;return e.forEach(e=>{t.isStringElement(e)&&!t.isEmptyElement(e)&&(n=!0)}),n&&e.length>1},m=()=>{let e=r.extra??o.extra?.();return u.value===`vertical`?!!e:!p()};return()=>{let{class:n,...s}=l,p=f.value,h=r.extra??o.extra?.(),g=o.default?.(),_=r.actions??t.flattenChildren(o.actions?.());_=_&&!Array.isArray(_)?[_]:_;let v=_&&_.length>0&&(0,c.createVNode)(`ul`,{class:`${p}-item-action`,key:`actions`},[_.map((e,t)=>(0,c.createVNode)(`li`,{key:`${p}-item-action-${t}`},[e,t!==_.length-1&&(0,c.createVNode)(`em`,{class:`${p}-item-action-split`},null)]))]),y=(0,c.createVNode)(d.value?`div`:`li`,{...s,class:e.default(`${p}-item`,{[`${p}-item-no-flex`]:!m()},n)},{default:()=>[u.value===`vertical`&&h?[(0,c.createVNode)(`div`,{class:`${p}-item-main`,key:`content`},[g,v]),(0,c.createVNode)(`div`,{class:`${p}-item-extra`,key:`extra`},[h])]:[g,v,i.cloneElement(h,{key:`extra`})]]});return d.value?(0,c.createVNode)(a.default,{flex:1,style:r.colStyle},{default:()=>[y]}):y}}});exports.default=u,exports.listItemProps=l;