import { Component, Input } from '@angular/core';
// tslint:disable
import _ from 'lodash';
import { AttendanceHelperComponent } from '../attendance-helper/attendance-helper.component';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/legacy-dialog";
import * as i2 from "@angular/common";
import * as i3 from "@angular/material/icon";
import * as i4 from "@ngx-translate/core";
export class AttendanceCardComponent {
    constructor(
    // private route: ActivatedRoute,
    dialog) {
        this.dialog = dialog;
        this.session = null;
        this.status = 0;
        this.config = null;
        this.showInfo = true;
    }
    ngOnInit() {
        // this.route.data.subscribe(data => {
        //   this.pageConfig = data.pageData.data
        //   console.log(this.pageConfig)
        // })
    }
    openHelp(content) {
        const dialogRef = this.dialog.open(AttendanceHelperComponent, {
            // height: '400px',
            // width: '770px',
            maxWidth: '1250px',
            data: { content, helperConfig: _.get(this.config, 'attendenceHelp') },
        });
        // dialogRef.componentInstance.xyz = this.configSvc
        dialogRef.afterClosed().subscribe((result) => {
            if (result) {
                console.log(result);
            }
        });
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AttendanceCardComponent, deps: [{ token: i1.MatLegacyDialog }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AttendanceCardComponent, selector: "ws-widget-attendance-card", inputs: { session: "session", status: "status", config: "config", showInfo: "showInfo" }, ngImport: i0, template: "<div class=\"mt-4\">\n    <!-- <p class=\"font-bold mat-body-1 margin-bottom-xs ws-mat-black60-text\">{{'attendancecard.attendanceStatus' | translate}}</p> -->\n    <div class=\"ws-mat-orange-medium-bg attandance-card p-5\">\n        <div class=\"flex justify-center items-center\">\n            <div class=\"mr-5\" [ngStyle]=\"{'opacity': (session?.completionStatus === 2) ? 1 : 0.7}\">\n                <span class=\"mat-body-2\">{{'attendancecard.sessionAttendance' | translate}}</span>\n\n                <div class=\"flex\" *ngIf=\"!session?.completionStatus || session?.completionStatus !== 2\">\n                    <img class=\"mat-icon mr-3\" src=\"/assets/icons/attendance_qr.svg\" alt=\"qr icon\" title=\"attendance\" />\n                    <span class=\"mat-body-2\">{{'attendancecard.unmarked' | translate}}</span>\n                </div>\n                <div class=\"flex\" *ngIf=\"session?.completionStatus === 2\">\n                    <mat-icon class=\"ws-mat-green-2-text mr-3\">check_circle</mat-icon>\n                    <span class=\"mat-body-2\">{{'attendancecard.marked' | translate}} @{{session?.lastCompletedTime | date :'shortTime'}}</span>\n                </div>\n            </div>\n            <div class=\"flex-1 flex justify-center\" >\n                <span  *ngIf=\"(!session?.completionStatus || session?.completionStatus !== 2)\" class=\"mat-body-2\">{{'attendancecard.afterBatchStarts' | translate}}</span>\n            </div>\n            <div class=\"text-right ml-5\">\n                <img class=\"mat-icon cursor-pointer\" src=\"/assets/icons/rounded_question.svg\" alt=\"attendance help\"\n                    title=\"attendance help\" (click)=\"openHelp()\" />\n            </div>\n        </div>\n    </div>\n</div>", styles: [".attandance-card{border:1px solid rgb(239,149,30);opacity:1;background-color:#ef951e52!important;padding:16px;border-radius:12px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AttendanceCardComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ws-widget-attendance-card', template: "<div class=\"mt-4\">\n    <!-- <p class=\"font-bold mat-body-1 margin-bottom-xs ws-mat-black60-text\">{{'attendancecard.attendanceStatus' | translate}}</p> -->\n    <div class=\"ws-mat-orange-medium-bg attandance-card p-5\">\n        <div class=\"flex justify-center items-center\">\n            <div class=\"mr-5\" [ngStyle]=\"{'opacity': (session?.completionStatus === 2) ? 1 : 0.7}\">\n                <span class=\"mat-body-2\">{{'attendancecard.sessionAttendance' | translate}}</span>\n\n                <div class=\"flex\" *ngIf=\"!session?.completionStatus || session?.completionStatus !== 2\">\n                    <img class=\"mat-icon mr-3\" src=\"/assets/icons/attendance_qr.svg\" alt=\"qr icon\" title=\"attendance\" />\n                    <span class=\"mat-body-2\">{{'attendancecard.unmarked' | translate}}</span>\n                </div>\n                <div class=\"flex\" *ngIf=\"session?.completionStatus === 2\">\n                    <mat-icon class=\"ws-mat-green-2-text mr-3\">check_circle</mat-icon>\n                    <span class=\"mat-body-2\">{{'attendancecard.marked' | translate}} @{{session?.lastCompletedTime | date :'shortTime'}}</span>\n                </div>\n            </div>\n            <div class=\"flex-1 flex justify-center\" >\n                <span  *ngIf=\"(!session?.completionStatus || session?.completionStatus !== 2)\" class=\"mat-body-2\">{{'attendancecard.afterBatchStarts' | translate}}</span>\n            </div>\n            <div class=\"text-right ml-5\">\n                <img class=\"mat-icon cursor-pointer\" src=\"/assets/icons/rounded_question.svg\" alt=\"attendance help\"\n                    title=\"attendance help\" (click)=\"openHelp()\" />\n            </div>\n        </div>\n    </div>\n</div>", styles: [".attandance-card{border:1px solid rgb(239,149,30);opacity:1;background-color:#ef951e52!important;padding:16px;border-radius:12px}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.MatLegacyDialog }]; }, propDecorators: { session: [{
                type: Input
            }], status: [{
                type: Input
            }], config: [{
                type: Input
            }], showInfo: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 