'use strict';

var logger = require('../../utils/logger.js');

class ProductCollectionService {
    productCollectionClient;
    enabled;
    constructor(productCollectionClient, serviceFeatureConfig) {
        this.productCollectionClient = productCollectionClient;
        this.productCollectionClient = productCollectionClient;
        this.enabled = Boolean(serviceFeatureConfig.collections);
        if (!this.enabled)
            logger.default.info(`Product collections: disabled `);
    }
    async getProductCollections(token) {
        if (!this.enabled)
            return [];
        return this.productCollectionClient.getProductCollections(token);
    }
    async getProductCollection(token, id) {
        if (!this.enabled)
            return undefined;
        return this.productCollectionClient.getProductCollection(token, id);
    }
}

exports.ProductCollectionService = ProductCollectionService;
//# sourceMappingURL=productCollectionService.js.map
