import{flattenChildren as p}from"../_util/props-util/index.mjs";import{camelize as l}from"../_util/util.mjs";function _(r,n){return"key"in r&&r.key!==void 0&&r.key!==null?r.key:r.dataIndex?Array.isArray(r.dataIndex)?r.dataIndex.join("."):r.dataIndex:n}function x(r,n){return n?`${n}-${r}`:`${r}`}function A(r,n){return typeof r=="function"?r(n):r}function h(r=[]){const n=p(r),i=[];return n.forEach(t=>{if(!t)return;const f=t.key,d=t.props?.style||{},u=t.props?.class||"",e=t.props||{};for(const[c,y]of Object.entries(e))e[l(c)]=y;const{default:s,...a}=t.children||{},o={...a,...e,style:d,class:u};if(f&&(o.key=f),t.type?.__ANT_TABLE_COLUMN_GROUP)o.children=h(typeof s=="function"?s():s);else{const c=t.children?.default;o.customRender=o.customRender||c}i.push(o)}),i}export{h as convertChildrenToColumns,_ as getColumnKey,x as getColumnPos,A as renderColumnTitle};
