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