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 { Router } from '@angular/router';
import { ComponentHelper } from '../../../classes/component-helper';
import { Constants } from '../../../core.consts';
import { BlocksService } from '../../../services/blocks/blocks.service';
var BlockBannerFullEcComponent = /** @class */ (function (_super) {
    __extends(BlockBannerFullEcComponent, _super);
    function BlockBannerFullEcComponent(blocksService, consts, router) {
        var _this = _super.call(this) || this;
        _this.blocksService = blocksService;
        _this.consts = consts;
        _this.router = router;
        _this.getImage = function (banner) { return _this.blocksService.getBannerImage(banner); };
        _this.formUrl = function (banner) { return _this.blocksService.formUrl(banner); };
        _this.ecOnConstruct();
        return _this;
    }
    BlockBannerFullEcComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.banners = this.banners.map(function (banner) { return __assign(__assign({}, banner), banner.translations[_this.consts.getLocale()]); });
        this.ecOnInit();
    };
    BlockBannerFullEcComponent.prototype.handlePage = function (page) {
        return this.router.url.includes(page);
    };
    BlockBannerFullEcComponent.ctorParameters = function () { return [
        { type: BlocksService },
        { type: Constants },
        { type: Router }
    ]; };
    __decorate([
        Input()
    ], BlockBannerFullEcComponent.prototype, "banners", void 0);
    __decorate([
        Input()
    ], BlockBannerFullEcComponent.prototype, "meta", void 0);
    BlockBannerFullEcComponent = __decorate([
        Component({
            selector: 'app-block-banner-full-ec',
            template: "<!-- <div class=\"row\">\n     <div class=\"col-12 p-0\" id=\"banner-slider-home\">\n          <owl-carousel-o [options]=\"options\">\n               <ng-template carouselSlide *ngFor=\"let banner of banners\" [id]=\"banner.id\">\n                    <div class=\"item\">\n                         <img [src]=\"consts.mediaBannerUrl() + getImage(banner)\" class=\"w-100\">\n                         <div class=\"caption\">\n                              <a *ngIf=\"!banner.url\" [routerLink]=\"formUrl(banner)\">\n                                   <img src=\"assets/image/logo2.png\">\n                               </a>\n                               <a *ngIf=\"banner.url\" href=\"{{banner.url}}\">\n                                   <img src=\"assets/image/logo2.png\">\n                              </a>      \n                         </div>\n                    </div>\n               </ng-template>\n          </owl-carousel-o>\n     </div>\n</div> -->",
            styles: [".owl-theme .owl-nav{background:0 0!important}"]
        })
    ], BlockBannerFullEcComponent);
    return BlockBannerFullEcComponent;
}(ComponentHelper));
export { BlockBannerFullEcComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvY2stYmFubmVyLWZ1bGwtZWMuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmctZWFzeWNvbW1lcmNlLyIsInNvdXJjZXMiOlsibGliL2VjLWNvbXBvbmVudC9ibG9ja3MtZWMvYmxvY2stYmFubmVyLWZ1bGwtZWMvYmxvY2stYmFubmVyLWZ1bGwtZWMuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3Mi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