/**
 * @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.resourceSelected = new EventEmitter();
        this.newTheme = new EventEmitter();
        this.showPreview = false;
        this.noCategory = 'Sin categoria';
        this.saveResource = false;
    }
    /**
     * @return {?}
     */
    ContentComponent.prototype.openPreview = /**
     * @return {?}
     */
    function () {
        this.showPreview = true;
        this.saveResource = false;
        console.log('open it!');
    };
    /**
     * @return {?}
     */
    ContentComponent.prototype.openSelected = /**
     * @return {?}
     */
    function () {
        this.showPreview = true;
        this.saveResource = true;
    };
    /**
     * @param {?} e
     * @return {?}
     */
    ContentComponent.prototype.closePreview = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        this.showPreview = e;
        console.log(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': showPreview}\">\n        <bidi-content-preview *ngIf=\"showPreview\"\n        (close)=\"closePreview($event)\"\n        (resSelected)=\"selectResource($event)\"\n        (newTheme)=\"addTheme($event)\"\n        [resource]=\"resource\"\n        [themes]=\"themes\"\n        [saveResource]=\"saveResource\">\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\">\n    <div class=\"card-image is-pulled-left\">\n      <figure class=\"image\">\n        <img [src]=\"resource.previewUrl\" alt=\"Placeholder image\">\n      </figure>\n    </div>\n    <div class=\"card-content\">\n      <div class=\"content\">\n\n        <h3 class=\"is-size-6 is-ff-bold\">{{ resource.title }} |  <span *ngIf=\"resource.tags[0]\">{{ resource.tags[0].name || noCategory}}</span></h3>\n        <p class=\"is-size-7\">{{resource.abstract}}</p>\n        <p class=\"is-size-7 is-ff-regular has-text-grey\"><span *ngFor=\"let tag of resource.tags\" >#{{tag.name}}, </span>\n        </p>\n        <div class=\"buttons\">\n            <!--<button class=\"button is-tt-secondary is-outlined is-size-7\"\n            (click)=\"openPreview()\">Vista previa</button>-->\n            <button class=\"button is-tt-secondary is-outlined is-size-7\"\n            (click)=\"openSelected()\">Seleccionar</button>\n            <!--\n            <button class=\"button is-tt-secondary is-outlined is-size-7\"\n            selectResources[ngClass]=\"{'active-button': selected}\">\n              <span *ngIf=\"!selected; else isSelected\">Seleccionar</span>\n              <ng-template #isSelected><span >Seleccionado</span>  </ng-template>\n            </button>\n            -->\n          </div>\n      </div>\n    </div>\n  </div>\n</div>\n\n",
                    styles: [".card,.chek-container{cursor:pointer}.card-content{padding:5px 28px 5px 0;margin-left:77px}.card-content .content h3{margin-top:-5px;margin-bottom:2px}.card-content .content h3::first-letter{text-transform:uppercase}.card-content .content h4{margin-bottom:5px;padding:3px 7px}.card-content .content p{margin-bottom:0}.card-content .content p:last-child{margin-bottom:1em}.card-content .content .buttons{margin-top:7px}figure{margin:0;width:100%;height:50px;overflow:hidden;background:#333;text-align:center}figure img{display:inline-block;height:108%;-o-object-fit:cover;object-fit:cover;max-width:none;width:auto;margin:0 auto}.chek-container{position:absolute;right:4px;top:4px;z-index:15}.chek-container input[type=checkbox]{display:none}.chek-container .fake-check{width:20px;height:20px;background:#fff;border:.2em solid #00f699;border-radius:50%;transition:.25s}.chek-container .fake-check.selected{background:#00f699}.card{padding:7px;box-shadow:none}.card .card-image{width:70px;margin-right:7px;height:50px;margin-top:2px}input[type=checkbox]:checked~label.fake-check{background:#00f699!important}.content-component{margin-bottom:.6rem;transition:.25s;border:1px solid #e5e5e5}.content-component.selected{box-shadow:0 0 6px rgba(0,0,0,.3)}.content-preview-container{top:0;right:-97vw;bottom:0;background:#fff;z-index:100;position:fixed;width:97vw;transition:.25s}.content-preview-container.active{right:0;box-shadow:-4px 0 27px rgba(0,0,0,.3)}button.active-button{background-color:#0cf!important;border-color:#0cf!important;color:#fff!important}"]
                }] }
    ];
    ContentComponent.propDecorators = {
        resource: [{ type: Input }],
        selected: [{ type: Input }],
        themes: [{ 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.resourceSelected;
    /** @type {?} */
    ContentComponent.prototype.newTheme;
    /** @type {?} */
    ContentComponent.prototype.showPreview;
    /** @type {?} */
    ContentComponent.prototype.noCategory;
    /** @type {?} */
    ContentComponent.prototype.saveResource;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AYmlkaS9jb21tb24tY29tcG9uZW50cy8iLCJzb3VyY2VzIjpbImxpYi9tb2R1bGVzL2NvbnRlbnRzLWxpYnJhcnkvY29udGVudC9jb250ZW50LmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQUUsTUFBTSxFQUFFLFlBQVksRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUd2RTtJQUFBO1FBT1csYUFBUSxHQUFHLEtBQUssQ0FBQztRQUNqQixXQUFNLEdBQUcsS0FBSyxDQUFDO1FBQ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