"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRuleViewItems = void 0;
const getRuleViewItems = (rule, api) => {
    var _a, _b, _c;
    return {
        name: 'Condition',
        values: [
            ((_a = rule === null || rule === void 0 ? void 0 : rule.Predicates) === null || _a === void 0 ? void 0 : _a.length)
                ? (_b = rule === null || rule === void 0 ? void 0 : rule.Predicates) === null || _b === void 0 ? void 0 : _b.map((predicate) => api.predicateApi.predicateToString(predicate)).join(' AND ')
                : (_c = api.internalApi.getAdaptableQueryExpressionText(rule)) !== null && _c !== void 0 ? _c : 'No condition',
        ],
    };
};
exports.getRuleViewItems = getRuleViewItems;
