import { Component, Input } from "@angular/core";
import { DataType } from "../../../common/enum/data-type.enum";
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/material/icon";
import * as i3 from "@angular/material/card";
export class RelatedContentComponent {
    constructor() {
        this.contents = [];
        this.dataType = DataType;
        this.imageProcess = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTkiIHZpZXdCb3g9IjAgMCAxOCAxOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMCAwLjVWNi41SDJWMTYuNUgxMlYxOC41SDE4VjEyLjVIMTJWMTQuNUg0VjYuNUg2VjQuNUgxMlY2LjVIMThWMC41SDEyVjIuNUg2VjAuNUgwWk00IDIuNVY0LjVIMlYyLjVINFpNMTYgMi41VjQuNUgxNFYyLjVIMTZaTTE2IDE2LjVWMTQuNUgxNFYxNi41SDE2WiIgZmlsbD0iYmxhY2siIGZpbGwtb3BhY2l0eT0iMC42Ii8+DQo8L3N2Zz4NCg==';
    }
    ngOnInit() {
        this.LANG = '';
    }
    removeContent(content) {
        const index = this.contents.findIndex(x => {
            return x.id === content.id;
        });
        if (index >= 0) {
            this.contents.splice(index, 1);
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RelatedContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: RelatedContentComponent, selector: "qms-related-content", inputs: { header: "header", contents: "contents" }, ngImport: i0, template: "<div\n  id=\"qmslib_related_content\"\n  class=\"related__content_container\"\n  *ngIf=\"contents.length > 0\"\n>\n  <div *ngIf=\"header\" id=\"qmslib_related_content_header\">\n    <span>{{ header }}</span>\n  </div>\n  <div id=\"qmslib_related_content_body\" class=\"\">\n    <div id=\"qmslib_related_content_body_001\" class=\"mt-1 pl-2 pr-2 ps-2 pe-2\">\n      <mat-card appearance=\"outlined\" class=\"card col-12\" *ngFor=\"let content of contents\">\n        <div class=\"row\">\n          <div class=\"col-2\" *ngIf=\"content.itemType === dataType.folder\">\n            <mat-icon style=\"color: #4acaff\">folder_filled</mat-icon>\n          </div>\n          <div class=\"col-2\" *ngIf=\"content.itemType === dataType.document\">\n            <mat-icon>insert_drive_file</mat-icon>\n          </div>\n          <div class=\"col-2\" *ngIf=\"content.itemType === dataType.area\">\n            <mat-icon style=\"color: #a4b0de\">folder_filled</mat-icon>\n          </div>\n          <div class=\"col-2\" *ngIf=\"content.itemType === dataType.process\">\n            <img src=\"{{ imageProcess }}\" />\n          </div>\n          <div class=\"col-2\" *ngIf=\"content.itemType === dataType.deviation\">\n            <mat-icon class=\"material-icons-outlined\">report_problem</mat-icon>\n          </div>\n          <div class=\"col-2\" *ngIf=\"content.itemType === dataType.checklist\">\n            <mat-icon class=\"material-icons-outlined\"\n              >format_list_bulleted</mat-icon\n            >\n          </div>\n          <div class=\"col-2\" *ngIf=\"content.itemType === dataType.risk\">\n            <mat-icon class=\"material-icons-outlined\">border_all</mat-icon>\n          </div>\n          <div class=\"col-8\">\n            <div class=\"col-12 content\">\n              <span>{{ content.itemName }}</span>\n            </div>\n          </div>\n          <div class=\"col-2\">\n            <mat-icon class=\"cursor\" (click)=\"removeContent(content)\"\n              >close</mat-icon\n            >\n          </div>\n        </div>\n      </mat-card>\n    </div>\n  </div>\n</div>\n", styles: [".related__content_container .card{min-height:60px;box-shadow:none;border-color:var(--mat-card-border-color);border-top:none;border-right:none;border-left:none;border-radius:0}.related__content_container .card .content{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.related__content_container .card .cursor{cursor:pointer}.related__content_container .mat-mdc-card{padding:16px 0}.related__content_container .align-icon{margin-top:5px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RelatedContentComponent, decorators: [{
            type: Component,
            args: [{ selector: 'qms-related-content', template: "<div\n  id=\"qmslib_related_content\"\n  class=\"related__content_container\"\n  *ngIf=\"contents.length > 0\"\n>\n  <div *ngIf=\"header\" id=\"qmslib_related_content_header\">\n    <span>{{ header }}</span>\n  </div>\n  <div id=\"qmslib_related_content_body\" class=\"\">\n    <div id=\"qmslib_related_content_body_001\" class=\"mt-1 pl-2 pr-2 ps-2 pe-2\">\n      <mat-card appearance=\"outlined\" class=\"card col-12\" *ngFor=\"let content of contents\">\n        <div class=\"row\">\n          <div class=\"col-2\" *ngIf=\"content.itemType === dataType.folder\">\n            <mat-icon style=\"color: #4acaff\">folder_filled</mat-icon>\n          </div>\n          <div class=\"col-2\" *ngIf=\"content.itemType === dataType.document\">\n            <mat-icon>insert_drive_file</mat-icon>\n          </div>\n          <div class=\"col-2\" *ngIf=\"content.itemType === dataType.area\">\n            <mat-icon style=\"color: #a4b0de\">folder_filled</mat-icon>\n          </div>\n          <div class=\"col-2\" *ngIf=\"content.itemType === dataType.process\">\n            <img src=\"{{ imageProcess }}\" />\n          </div>\n          <div class=\"col-2\" *ngIf=\"content.itemType === dataType.deviation\">\n            <mat-icon class=\"material-icons-outlined\">report_problem</mat-icon>\n          </div>\n          <div class=\"col-2\" *ngIf=\"content.itemType === dataType.checklist\">\n            <mat-icon class=\"material-icons-outlined\"\n              >format_list_bulleted</mat-icon\n            >\n          </div>\n          <div class=\"col-2\" *ngIf=\"content.itemType === dataType.risk\">\n            <mat-icon class=\"material-icons-outlined\">border_all</mat-icon>\n          </div>\n          <div class=\"col-8\">\n            <div class=\"col-12 content\">\n              <span>{{ content.itemName }}</span>\n            </div>\n          </div>\n          <div class=\"col-2\">\n            <mat-icon class=\"cursor\" (click)=\"removeContent(content)\"\n              >close</mat-icon\n            >\n          </div>\n        </div>\n      </mat-card>\n    </div>\n  </div>\n</div>\n", styles: [".related__content_container .card{min-height:60px;box-shadow:none;border-color:var(--mat-card-border-color);border-top:none;border-right:none;border-left:none;border-radius:0}.related__content_container .card .content{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.related__content_container .card .cursor{cursor:pointer}.related__content_container .mat-mdc-card{padding:16px 0}.related__content_container .align-icon{margin-top:5px}\n"] }]
        }], propDecorators: { header: [{
                type: Input
            }], contents: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 