"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getExportRowsViewItems = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const ExpressionPreview_1 = require("../../../components/ExpressionEditor/ExpressionPreview");
const Tag_1 = require("../../../components/Tag");
const getExportRowsViewItems = (report, api) => {
    let element = null;
    if (report.ReportRowScope === 'ExpressionRows') {
        element = React.createElement(ExpressionPreview_1.ExpressionPreview, { query: report.Query });
    }
    else {
        element = api.exportApi.internalApi.getReportExpressionDescription(report, api.columnApi.getColumns());
    }
    return {
        name: 'Rows',
        view: React.createElement(Tag_1.Tag, null, element),
    };
};
exports.getExportRowsViewItems = getExportRowsViewItems;
