import{defineComponent as w,createVNode as o}from"vue";import v from"../Cell/index.mjs";import{useInjectExpandedRow as y}from"../context/ExpandedRowContext.mjs";import{useInjectTable as h}from"../context/TableContext.mjs";const j=w({name:"ExpandedRow",inheritAttrs:!1,props:["prefixCls","component","cellComponent","expanded","colSpan","isEmpty"],setup(t,{slots:l,attrs:p}){const a=h(),d=y(),{fixHeader:r,fixColumn:s,componentWidth:i,horizonScroll:c}=d;return()=>{const{prefixCls:n,component:m,cellComponent:f,expanded:x,colSpan:u,isEmpty:C}=t;return o(m,{class:p.class,style:{display:x?null:"none"}},{default:()=>[o(v,{component:f,prefixCls:n,colSpan:u},{default:()=>{let e=l.default?.();return(C?c.value:s.value)&&(e=o("div",{style:{width:`${i.value-(r.value?a.scrollbarSize:0)}px`,position:"sticky",left:0,overflow:"hidden"},class:`${n}-expanded-row-fixed`},[e])),e}})]})}}});export{j as default};
