"use strict";

exports.__esModule = true;
exports.simplifyColumn = simplifyColumn;
exports.simplifyColumns = simplifyColumns;
function simplifyColumn({
  id: maybeId,
  name,
  hideable = true,
  hiddenFromCustomColumnsSelection = false,
  infoTooltipProps,
  ...rest
}, {
  fallbackID
} = {}) {
  const id = maybeId ?? String(fallbackID);
  return {
    id,
    name: name ?? '',
    hiddenFromCustomColumnsSelection,
    hideable: maybeId == null ? false : hideable,
    infoTooltipProps: infoTooltipProps ? {
      content: infoTooltipProps.content,
      panelContent: infoTooltipProps.panelContent,
      ...infoTooltipProps
    } : undefined,
    ...rest
  };
}
function simplifyColumns(tableColumns) {
  return tableColumns.map((props, i) => {
    return simplifyColumn(props, {
      fallbackID: i
    });
  });
}
//# sourceMappingURL=simplifyColumns.js.map