import { __decorate } from "tslib";
import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
import { SharedService } from '../../../../shared/service/shared.service';
import { SummaryBase } from '../summary-base';
import { ItemService } from '../../item-service/item-service.service';
let HotSpotSummaryComponent = class HotSpotSummaryComponent extends SummaryBase {
    constructor(sharedService, itemService) {
        super(sharedService);
        this.sharedService = sharedService;
        this.itemService = itemService;
        this.imagePath = [];
    }
    ngOnChanges(changes) {
        if (this.question) {
            this.convertedTime = this.convertTime2(this.question.questionTimeSpent, 'time');
        }
    }
    ngOnInit() {
    }
};
HotSpotSummaryComponent.ctorParameters = () => [
    { type: SharedService },
    { type: ItemService }
];
__decorate([
    Input('summaryData')
], HotSpotSummaryComponent.prototype, "question", void 0);
__decorate([
    Input()
], HotSpotSummaryComponent.prototype, "imagePath", void 0);
HotSpotSummaryComponent = __decorate([
    Component({
        selector: 'lib-hot-spot-summary',
        template: "<ng-container *ngIf=\"question.itemType == 12\">\n  <div class=\"wk-row\">\n    <div class=\"wkqp-col-12\">\n      <div class=\"wkqp-layout-item mb20 summary4-mb0\">\n        <div class=\"wkqp-field-item summary5-mb0\">\n          <div class=\"wk-row mb20  gray-bg-result\">\n            <div class=\"wk-col-8 responsive-pl15\">\n              <!--Question sequence-->\n              <span class=\"wkqb-question-number\">\n                <strong>{{ question.sequence }}</strong>\n              </span>\n\n              <!--Question Prompt text-->\n              <span\n                class=\"qp-ts-number-right\"\n                *ngIf=\"\n                  question.assetsPosition != AssetPositionValuesEnum.withInText\n                \"\n              >\n                <strong class=\"wkqp-prewrap\">{{ question.promptText }}</strong>\n              </span>\n              <span\n                *ngIf=\"\n                  question.assetsPosition == AssetPositionValuesEnum.withInText\n                \"\n              >\n                <item-text-assets\n                  [promptText]=\"question.promptText\"\n                  [assetData]=\"question.assets\"\n                  [assetsPosition]=\"AssetPositionValuesEnum.withInText\"\n                ></item-text-assets>\n              </span>\n            </div>\n\n            <!--Question Time spent-->\n            <div class=\"wk-col-4 responsive-timespent time-qu-pt-remove\">\n              <span\n                class=\"que-mob-left\"\n                [ngClass]=\"getQuestionProgressClass(question)\"\n              >\n              </span>\n              <span\n                class=\"wkqp-badge time-mob-right\"\n                [ngClass]=\"getOvertimelimitClass(question)\"\n              >\n                Time spent -\n                {{ convertedTime }}\n              </span>\n            </div>\n          </div>\n          <div\n            class=\"common-full-width\"\n            *ngIf=\"question.userResponse[0] && question.userResponse.length > 0\"\n          >\n            <!--Your Response-->\n            <p\n              class=\"wkqp-prewrap mb20\"\n              [ngClass]=\"getSelectedResponseClass(question)\"\n            >\n              <strong>Your Response: </strong>\n            </p>\n            <ng-container *ngIf=\"question\">\n              <hotspot-svg\n                [hideLabel]=\"true\"\n                [userAnswerDetails]=\"question.userResponse\"\n                [imageSrc]=\"question.assets[0]\"\n                [imageType]=\"question.assets[0].assetName\"\n                [accessType]=\"'userResponse'\"\n              ></hotspot-svg>\n            </ng-container>\n\n            <!--Correct Response-->\n            <div *ngIf=\"question.isCorrect != 1\">\n              <p\n                class=\"wkqp-alert-success wkqp-prewrap wkqp-success  response-mb20\"\n              >\n                <strong>Correct Response: </strong>\n              </p>\n\n              <ng-container *ngIf=\"question\">\n                <div>\n                  <hotspot-svg\n                    [hideLabel]=\"true\"\n                    [correctAnswerDetails]=\"\n                      question['graphicInteraction']['hotspotChoices'][0]\n                    \"\n                    [imagePath]=\"imagePath\"\n                    [imageType]=\"question.assets[0].assetName\"\n                    [imageSrc]=\"question.assets[0]\"\n                    [accessType]=\"'correctAnswer'\"\n                  ></hotspot-svg>\n                </div>\n              </ng-container>\n            </div>\n          </div>\n          <div *ngIf=\"!question.userResponse[0]\">\n            <p class=\"wkqp-alert-danger\">\n              <strong>You did not answer this question</strong>\n            </p>\n          </div>\n          <div class=\"common-full-width mb20\">\n            <!--Rationale-->\n            <lib-rationale [itemData]=\"question.modelFeedback\"></lib-rationale>\n            <!-- remediation -->\n            <lib-remediation\n              [itemData]=\"question.remediationLinks\"\n            ></lib-remediation>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</ng-container>\n",
        changeDetection: ChangeDetectionStrategy.OnPush,
        styles: [""]
    })
], HotSpotSummaryComponent);
export { HotSpotSummaryComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG90LXNwb3Qtc3VtbWFyeS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9leGFtLWVuZ2luZS1saWJyYXJpZXMvIiwic291cmNlcyI6WyJsaWIvaXRlbS10eXBlcy9jb21wb25lbnRzL3N1bW1hcnkvaG90LXNwb3Qtc3VtbWFyeS9ob3Qtc3BvdC1zdW1tYXJ5LmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUNMLFNBQVMsRUFFVCxLQUFLLEVBR0wsdUJBQXVCLEVBQ3hCLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSwyQ0FBMkMsQ0FBQztBQUMxRSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDOUMsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLHlDQUF5QyxDQUFDO0FBU3RFLElBQWEsdUJBQXVCLEdBQXBDLE1BQWEsdUJBQXdCLFNBQVEsV0FBVztJQVd0RCxZQUFtQixhQUE0QixFQUFVLFdBQXdCO1FBQy9FLEtBQUssQ0FBQyxhQUFhLENBQUMsQ0FBQztRQURKLGtCQUFhLEdBQWIsYUFBYSxDQUFlO1FBQVUsZ0JBQVcsR0FBWCxXQUFXLENBQWE7UUFSeEUsY0FBUyxHQUFRLEVBQUUsQ0FBQztJQVU3QixDQUFDO0lBUkQsV0FBVyxDQUFDLE9BQXNCO1FBQ2hDLElBQUksSUFBSSxDQUFDLFFBQVEsRUFBRTtZQUNqQixJQUFJLENBQUMsYUFBYSxHQUFHLElBQUksQ0FBQyxZQUFZLENBQUMsSUF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