import StringExtensions from './Extensions/StringExtensions';
export const getScopeViewItems = (scope, api) => {
    let values = [];
    if ('ColumnIds' in scope && Array.isArray(scope.ColumnIds)) {
        values = scope.ColumnIds;
        values = scope.ColumnIds.map((columnId) => api.columnApi.getFriendlyNameForColumnId(columnId)).filter(Boolean);
    }
    if ('DataTypes' in scope) {
        values = scope.DataTypes.map((d) => {
            return 'Data Type: ' + StringExtensions.CapitaliseFirstLetter(d);
        });
    }
    if ('All' in scope) {
        values = ['All Columns'];
    }
    if ('ColumnTypes' in scope) {
        values = scope.ColumnTypes;
    }
    return {
        label: 'Scope',
        name: 'Target',
        values,
    };
};
