"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const __1 = require("../..");
const dashboardContext_1 = require("./dashboardContext");
const filter = {
    id: 'filter-uuid',
    label: 'Country',
    operator: __1.FilterOperator.EQUALS,
    target: { fieldId: 'orders.country', tableName: 'orders' },
    values: ['US'],
    tileTargets: {
        'tile-uuid': { fieldId: 'orders.country', tableName: 'orders' },
    },
    lockedTabUuids: ['tab-uuid'],
    requiredGroupId: 'group-uuid',
};
describe('serializeDashboardFiltersForAiContext', () => {
    it('removes opaque identifiers from every filter group', () => {
        const filters = {
            dimensions: [filter],
            metrics: [filter],
            tableCalculations: [filter],
        };
        expect((0, dashboardContext_1.serializeDashboardFiltersForAiContext)(filters)).toEqual({
            dimensions: [
                {
                    label: 'Country',
                    operator: __1.FilterOperator.EQUALS,
                    target: {
                        fieldId: 'orders.country',
                        tableName: 'orders',
                    },
                    values: ['US'],
                },
            ],
            metrics: [
                {
                    label: 'Country',
                    operator: __1.FilterOperator.EQUALS,
                    target: {
                        fieldId: 'orders.country',
                        tableName: 'orders',
                    },
                    values: ['US'],
                },
            ],
            tableCalculations: [
                {
                    label: 'Country',
                    operator: __1.FilterOperator.EQUALS,
                    target: {
                        fieldId: 'orders.country',
                        tableName: 'orders',
                    },
                    values: ['US'],
                },
            ],
        });
    });
});
//# sourceMappingURL=dashboardContext.test.js.map