function generateColumnsFromConfig(entityConfig, options) {
  const { excludeFields = [], includeOnly } = options || {};
  return entityConfig.fields.filter((field) => {
    if (!field.display.showInList) return false;
    if (excludeFields.includes(field.name)) return false;
    if (includeOnly && !includeOnly.includes(field.name)) return false;
    return true;
  }).sort((a, b) => a.display.order - b.display.order).map((field) => ({
    key: field.name,
    header: field.display.label,
    sortable: field.api.sortable,
    className: field.display.className
  }));
}
export {
  generateColumnsFromConfig
};
