var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { Component, Input } from '@angular/core';
import { ComponentHelper } from '../../../classes/component-helper';
import { Constants } from '../../../core.consts';
import { AnalyticsService } from '../../../services/analytics.service';
var BlockProductsEcComponent = /** @class */ (function (_super) {
    __extends(BlockProductsEcComponent, _super);
    function BlockProductsEcComponent(consts, analyticsService) {
        var _this = _super.call(this) || this;
        _this.consts = consts;
        _this.analyticsService = analyticsService;
        _this.boxesInlcudesCode = function (box) { return _this.meta.code.toUpperCase().includes(box.toUpperCase()); };
        _this.ecOnConstruct();
        return _this;
    }
    BlockProductsEcComponent.prototype.ngOnInit = function () {
        var _a, _b;
        this.meta = __assign(__assign({}, this.meta), (this.meta.translations ? this.meta.translations[this.consts.getLocale()] : { name: null }));
        this.analyticsService.callEvent('view_item_list', { products: this.products, item_list_name: this.meta.name || 'Block Products', item_list_id: ((_b = (_a = this.meta.name) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.replace(' ', '-')) || 'block-products' });
        this.ecOnInit();
    };
    BlockProductsEcComponent.prototype.ngOnChanges = function () {
    };
    BlockProductsEcComponent.prototype.getKeyByValue = function (object, value) {
        return Object.keys(object).find(function (key) { return object[key] === value; });
    };
    BlockProductsEcComponent.ctorParameters = function () { return [
        { type: Constants },
        { type: AnalyticsService }
    ]; };
    __decorate([
        Input()
    ], BlockProductsEcComponent.prototype, "products", void 0);
    __decorate([
        Input()
    ], BlockProductsEcComponent.prototype, "meta", void 0);
    BlockProductsEcComponent = __decorate([
        Component({
            selector: 'app-block-products-ec',
            template: "<!-- <div class=\"row\">\n     <div class=\"col-12 text-center mt-4\">\n          <h1 class=\"ff-source-bold color-golden\">\n               {{ meta.name || 'NOVEDADES'}}\n          </h1>\n     </div>\n     <div class=\"col-12 p-0\">\n          <div class=\"container\">\n               <owl-carousel-o [options]=\"options\" class=\" py-3 px-md-5 px-0\">\n                    <ng-container *ngFor=\"let product of products\">\n                         <ng-template carouselSlide>\n                              <div class=\"px-4 py-0 text-center\">\n                                   <app-product [product]=\"product\"></app-product>\n                              </div>\n                         </ng-template>\n                    </ng-container>\n               </owl-carousel-o>\n          </div>\n     </div>\n</div> -->",
            styles: [""]
        })
    ], BlockProductsEcComponent);
    return BlockProductsEcComponent;
}(ComponentHelper));
export { BlockProductsEcComponent };
//# sourceMappingURL=data:application/json;base64, 