import{useInjectTable as e}from"../context/TableContext.mjs";import{getColumnsKey as t}from"../utils/valueUtil.mjs";import n from"../Cell/index.mjs";import{getCellFixedInfo as r}from"../utils/fixUtil.mjs";import i from"./DragHandle.mjs";import{createVNode as a,defineComponent as o}from"vue";var s=o({name:`HeaderRow`,props:[`cells`,`stickyOffsets`,`flattenColumns`,`rowComponent`,`cellComponent`,`index`,`customHeaderRow`],setup(o){let s=e();return()=>{let{prefixCls:e,direction:c}=s,{cells:l,stickyOffsets:u,flattenColumns:d,rowComponent:f,cellComponent:p,customHeaderRow:m,index:h}=o,g;m&&(g=m(l.map(e=>e.column),h));let _=t(l.map(e=>e.column));return a(f,g,{default:()=>[l.map((t,o)=>{let{column:s}=t,l=r(t.colStart,t.colEnd,d,u,c),f;s&&s.customHeaderCell&&(f=t.column.customHeaderCell(s));let m=s;return a(n,{...t,cellType:`header`,ellipsis:s.ellipsis,align:s.align,component:p,prefixCls:e,key:_[o],...l,additionalProps:f,rowType:`header`,column:s},{default:()=>s.title,dragHandle:()=>m.resizable?a(i,{prefixCls:e,width:m.width,minWidth:m.minWidth,maxWidth:m.maxWidth,column:m},null):null})})]})}}});export{s as default};