'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var util = require('../util.cjs');

function fillTitle(columns, columnTitleProps) {
  return columns.map((column) => {
    const cloneColumn = {
      ...column
    };
    cloneColumn.title = util.renderColumnTitle(cloneColumn.title, columnTitleProps);
    if ("children" in cloneColumn)
      cloneColumn.children = fillTitle(cloneColumn.children, columnTitleProps);
    return cloneColumn;
  });
}
function useTitleColumns(columnTitleProps) {
  const filledColumns = (columns) => fillTitle(columns, columnTitleProps.value);
  return [filledColumns];
}

exports.default = useTitleColumns;
//# sourceMappingURL=useTitleColumns.cjs.map
