/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, Input, Output, EventEmitter } from '@angular/core';
export class ContentComponent {
    constructor() {
        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 {?}
     */
    openPreview() {
        this.showPreview = true;
    }
    /**
     * @return {?}
     */
    openSelected() {
        if (this.noPublicator === true) {
            this.openPreview();
        }
        else {
            this.showPublicator = true;
            this.saveResource = true;
        }
    }
    /**
     * @param {?} e
     * @return {?}
     */
    closePreview(e) {
        this.showPreview = e;
    }
    /**
     * @param {?} e
     * @return {?}
     */
    closePublicator(e) {
        this.showPublicator = e;
    }
    /**
     * @param {?} r
     * @return {?}
     */
    selectResource(r) {
        this.resourceSelected.emit(r);
    }
    /**
     * @param {?} e
     * @return {?}
     */
    addTheme(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 }]
};
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;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AYmlkaS9jb21tb24tY29tcG9uZW50cy8iLCJzb3VyY2VzIjpbImxpYi9tb2R1bGVzL2NvbnRlbnRzLWxpYnJhcnkvY29udGVudC9jb250ZW50LmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBT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