/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, Input, Output, EventEmitter } from '@angular/core';
var ContentComponent = /** @class */ (function () {
    function ContentComponent() {
        this.selected = false;
        this.themes = false;
        this.views = 0;
        this.resourceSelected = new EventEmitter();
        this.newTheme = new EventEmitter();
        this.noOpinions = false;
        this.showPreview = false;
        this.showPublicator = false;
        this.noCategory = 'Sin categoría';
        this.saveResource = false;
    }
    /**
     * @return {?}
     */
    ContentComponent.prototype.openPreview = /**
     * @return {?}
     */
    function () {
        this.showPreview = true;
    };
    /**
     * @return {?}
     */
    ContentComponent.prototype.openSelected = /**
     * @return {?}
     */
    function () {
        if (this.noPublicator === true) {
            this.openPreview();
        }
        else {
            this.showPublicator = true;
            this.saveResource = true;
        }
    };
    /**
     * @param {?} e
     * @return {?}
     */
    ContentComponent.prototype.closePreview = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        this.showPreview = e;
    };
    /**
     * @param {?} e
     * @return {?}
     */
    ContentComponent.prototype.closePublicator = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        this.showPublicator = e;
    };
    /**
     * @param {?} r
     * @return {?}
     */
    ContentComponent.prototype.selectResource = /**
     * @param {?} r
     * @return {?}
     */
    function (r) {
        this.resourceSelected.emit(r);
    };
    /**
     * @param {?} e
     * @return {?}
     */
    ContentComponent.prototype.addTheme = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        this.newTheme.emit(e);
    };
    ContentComponent.decorators = [
        { type: Component, args: [{
                    selector: 'bidi-content',
                    template: "<div class=\"content-component\" [ngClass]=\"{ 'selected': selected }\">\n    <div class=\"content-preview-container is-absolute\" [ngClass]=\"{'active': showPublicator}\">\n        <bidi-content-publicator *ngIf=\"showPublicator\"\n            (close)=\"closePublicator($event)\"\n            (resSelected)=\"selectResource($event)\"\n            (newTheme)=\"addTheme($event)\"\n            (showPreviewContent)=\"openPreview()\"\n            [resource]=\"resource\"\n            [themes]=\"themes\"\n            [saveResource]=\"saveResource\"\n            [dateSelect]=\"dateSelect\">\n        </bidi-content-publicator>\n    </div>\n\n    <div class=\"content-preview-container is-absolute\" [ngClass]=\"{'active': showPreview}\">\n        <bidi-content-preview *ngIf=\"showPreview\"\n            (close)=\"closePreview($event)\"\n            [resource]=\"resource\"\n            [themes]=\"themes\">\n        </bidi-content-preview>\n    </div>\n  <!--<div class=\"chek-container\">\n    <label class=\"chek-container fake-check\" [ngClass]=\"{ selected: selected }\"></label>\n  </div>-->\n\n  <div class=\"card\" (click)=\"openSelected()\">\n      <div class=\"selection-flag\">\n        <div></div>\n      </div>\n\n    <div class=\"card-image is-pulled-left\">\n      <figure class=\"image\">\n        <img [src]=\"resource.coverUrl\" alt=\"Placeholder image\">\n      </figure>\n    </div>\n    <div class=\"card-content\">\n      <div class=\"content\">\n        <h3>{{ resource.title }}</h3>\n        <h4>{{ resource.subtitle }}</h4>\n        <h4>Creado por: {{ resource.user.given_name }} {{ resource.user.family_name }}. {{ resource.processedAt | date:\"dd/MM/yyyy\" }}</h4>\n        <!--<div class=\"ratings-prev\">\n          <bidi-content-ratings [resourceId]=\"resource.id\" [views]=\"views\" [showOpinions]=\"noOpinions\"></bidi-content-ratings>\n        </div>-->\n        <div *ngIf=\"resource.assets.length > 1\">\n          <ul>\n            <li *ngFor=\"let asset of resource.assets\">\n              {{asset.title}}\n            </li>\n          </ul>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n\n",
                    styles: ["h3{font-family:latoblack;font-size:14px}h4{font-family:lato;font-size:12px;margin-top:5px;color:#727272}.card{padding:9px 9% 0 11%;box-shadow:none;border:1px solid #939393;border-radius:12px;margin:0 auto;min-height:70px;cursor:pointer}.card:hover{border-color:#00cefa}.card:hover .selection-flag{background:#00cefa}.card .card-content{padding:5px 28px 5px 0;margin-left:60px}.card .card-content .content h3{margin-top:-5px;margin-bottom:2px}.card .card-content .content h3::first-letter{text-transform:uppercase}.card .card-content .content h4{margin-bottom:0;padding:0}.card .card-content .content p{margin-bottom:0}.card .card-content .content p:last-child{margin-bottom:1em}.card .card-content .content .buttons{margin-top:7px}.card .selection-flag{width:20px;height:20px;border-radius:999999px;background:#ccc;position:absolute;left:5%;top:33%}.card .selection-flag div{border-radius:99999px;background:0 0;border:4px solid #fff;margin-top:1px;margin-left:1px;height:18px;width:18px}.card .card-image{width:49px;margin-right:7px;height:38px;margin-top:2px}.card .card-image figure{margin:0;width:100%;height:38px;overflow:hidden;background:#333;text-align:center}.card .card-image figure img{display:inline-block;height:108%;-o-object-fit:cover;object-fit:cover;max-width:none;width:auto;margin:0 auto}.content-component{margin-bottom:.6rem}.content-preview-container{top:0;right:-100vw;bottom:0;background:#fff;z-index:100;position:absolute;width:100%;transition:.25s}.content-preview-container.active{right:0}button.active-button{background-color:#0cf!important;border-color:#0cf!important;color:#fff!important}.ratings-prev{margin-left:2%}"]
                }] }
    ];
    ContentComponent.propDecorators = {
        resource: [{ type: Input }],
        selected: [{ type: Input }],
        themes: [{ type: Input }],
        views: [{ type: Input }],
        dateSelect: [{ type: Input }],
        noPublicator: [{ type: Input }],
        resourceSelected: [{ type: Output }],
        newTheme: [{ type: Output }]
    };
    return ContentComponent;
}());
export { ContentComponent };
if (false) {
    /** @type {?} */
    ContentComponent.prototype.resource;
    /** @type {?} */
    ContentComponent.prototype.selected;
    /** @type {?} */
    ContentComponent.prototype.themes;
    /** @type {?} */
    ContentComponent.prototype.views;
    /** @type {?} */
    ContentComponent.prototype.dateSelect;
    /** @type {?} */
    ContentComponent.prototype.noPublicator;
    /** @type {?} */
    ContentComponent.prototype.resourceSelected;
    /** @type {?} */
    ContentComponent.prototype.newTheme;
    /** @type {?} */
    ContentComponent.prototype.noOpinions;
    /** @type {?} */
    ContentComponent.prototype.showPreview;
    /** @type {?} */
    ContentComponent.prototype.showPublicator;
    /** @type {?} */
    ContentComponent.prototype.noCategory;
    /** @type {?} */
    ContentComponent.prototype.saveResource;
}
//# sourceMappingURL=data:application/json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