"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ClientFeatureToggleService = void 0;
class ClientFeatureToggleService {
    constructor({ clientFeatureToggleStore, }, segmentReadModel, { getLogger }) {
        this.logger = getLogger('services/client-feature-toggle-service.ts');
        this.segmentReadModel = segmentReadModel;
        this.clientFeatureToggleStore = clientFeatureToggleStore;
    }
    async getActiveSegmentsForClient() {
        return this.segmentReadModel.getActiveForClient();
    }
    async getClientFeatures(query) {
        const result = await this.clientFeatureToggleStore.getClient(query || {});
        return result.map(({ name, type, enabled, project, stale, strategies, variants, description, impressionData, dependencies, }) => ({
            name,
            type,
            enabled,
            project,
            stale,
            strategies,
            variants,
            description,
            impressionData,
            dependencies,
        }));
    }
}
exports.ClientFeatureToggleService = ClientFeatureToggleService;
//# sourceMappingURL=client-feature-toggle-service.js.map