"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),y=require("../Cell/index.js"),H=require("../context/TableContext.js"),b=require("../utils/fixUtil.js"),q=require("../utils/valueUtil.js"),R=require("./DragHandle.js"),T=n.defineComponent({name:"HeaderRow",props:["cells","stickyOffsets","flattenColumns","rowComponent","cellComponent","index","customHeaderRow"],setup(d){const u=H.useInjectTable();return()=>{const{prefixCls:r,direction:c}=u,{cells:l,stickyOffsets:m,flattenColumns:p,rowComponent:f,cellComponent:C,customHeaderRow:i,index:x}=d;let s;i&&(s=i(l.map(e=>e.column),x));const w=q.getColumnsKey(l.map(e=>e.column));return n.createVNode(f,s,{default:()=>[l.map((e,g)=>{const{column:t}=e,h=b.getCellFixedInfo(e.colStart,e.colEnd,p,m,c);let a;t&&t.customHeaderCell&&(a=e.column.customHeaderCell(t));const o=t;return n.createVNode(y.default,{...e,cellType:"header",ellipsis:t.ellipsis,align:t.align,component:C,prefixCls:r,key:w[g],...h,additionalProps:a,rowType:"header",column:t},{default:()=>t.title,dragHandle:()=>o.resizable?n.createVNode(R.default,{prefixCls:r,width:o.width,minWidth:o.minWidth,maxWidth:o.maxWidth,column:o},null):null})})]})}}});exports.default=T;
