"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getScopeViewItems = void 0;
const tslib_1 = require("tslib");
const StringExtensions_1 = tslib_1.__importDefault(require("./Extensions/StringExtensions"));
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_1.default.CapitaliseFirstLetter(d);
        });
    }
    if ('All' in scope) {
        values = ['All Columns'];
    }
    if ('ColumnTypes' in scope) {
        values = scope.ColumnTypes;
    }
    return {
        label: 'Scope',
        name: 'Target',
        values,
    };
};
exports.getScopeViewItems = getScopeViewItems;
