import { Component } from '@angular/core';
import { AbstractAppConfig } from '../../../../app.config';
import { SessionStorageService } from '../../../services/session/session-storage.service';
import { PaymentField } from '../base-field/payment-field.component';
import * as i0 from "@angular/core";
import * as i1 from "../../../../app.config";
import * as i2 from "../../../services/session/session-storage.service";
import * as i3 from "@hmcts/ccpay-web-component";
import * as i4 from "rpx-xui-translation";
export class CasePaymentHistoryViewerFieldComponent extends PaymentField {
    PAYMENT_HISTORY_WARNING = 'Recent payments may take a few minutes to reflect here.';
    constructor(appConfig, sessionStorage) {
        super(appConfig, sessionStorage);
    }
    static ɵfac = function CasePaymentHistoryViewerFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CasePaymentHistoryViewerFieldComponent)(i0.ɵɵdirectiveInject(i1.AbstractAppConfig), i0.ɵɵdirectiveInject(i2.SessionStorageService)); };
    static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CasePaymentHistoryViewerFieldComponent, selectors: [["ccd-case-payment-history-viewer-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 10, vars: 22, consts: [[1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-warning-text__assistive"], [3, "API_ROOT", "CCD_CASE_NUMBER", "BULKSCAN_API_ROOT", "SELECTED_OPTION", "ISBSENABLE", "LOGGEDINUSEREMAIL", "LOGGEDINUSERROLES", "REFUNDS_API_ROOT", "NOTIFICATION_API_ROOT", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "ISPAYMENTSTATUSENABLED"]], template: function CasePaymentHistoryViewerFieldComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0)(1, "span", 1);
            i0.ɵɵtext(2, "!");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(3, "strong", 2)(4, "span", 3);
            i0.ɵɵtext(5);
            i0.ɵɵpipe(6, "rpxTranslate");
            i0.ɵɵelementEnd();
            i0.ɵɵtext(7);
            i0.ɵɵpipe(8, "rpxTranslate");
            i0.ɵɵelementEnd()();
            i0.ɵɵelement(9, "ccpay-payment-lib", 4);
        } if (rf & 2) {
            i0.ɵɵadvance(5);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 18, "Warning"));
            i0.ɵɵadvance(2);
            i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 20, ctx.PAYMENT_HISTORY_WARNING), " ");
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("API_ROOT", ctx.getBaseURL())("CCD_CASE_NUMBER", ctx.caseReference)("BULKSCAN_API_ROOT", ctx.getPayBulkScanBaseURL())("SELECTED_OPTION", "CCDorException")("ISBSENABLE", "true")("LOGGEDINUSEREMAIL", ctx.getUserEmail())("LOGGEDINUSERROLES", ctx.getUserRoles())("REFUNDS_API_ROOT", ctx.getRefundsUrl())("NOTIFICATION_API_ROOT", ctx.getNotificationUrl())("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", false)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx.caseReference)("DCN_NUMBER", null)("ISPAYMENTSTATUSENABLED", "Enable");
        } }, dependencies: [i3.PaymentLibComponent, i4.RpxTranslatePipe], styles: [".govuk-warning-text[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:-20px}"] });
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CasePaymentHistoryViewerFieldComponent, [{
        type: Component,
        args: [{ selector: 'ccd-case-payment-history-viewer-field', template: "<div class=\"govuk-warning-text\">\n    <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n    <strong class=\"govuk-warning-text__text\">\n        <span class=\"govuk-warning-text__assistive\">{{'Warning' | rpxTranslate}}</span>\n        {{PAYMENT_HISTORY_WARNING | rpxTranslate}}\n    </strong>\n</div>\n<ccpay-payment-lib\n    [API_ROOT]=\"getBaseURL()\"\n    [CCD_CASE_NUMBER]=\"caseReference\"\n    [BULKSCAN_API_ROOT]=\"getPayBulkScanBaseURL()\"\n    [SELECTED_OPTION]=\"'CCDorException'\"\n    [ISBSENABLE]=\"'true'\"\n    [LOGGEDINUSEREMAIL]=\"getUserEmail()\"\n    [LOGGEDINUSERROLES]=\"getUserRoles()\"\n    [REFUNDS_API_ROOT]=\"getRefundsUrl()\"\n    [NOTIFICATION_API_ROOT]=\"getNotificationUrl()\"\n    [VIEW]=\"'case-transactions'\"\n    [TAKEPAYMENT]=\"false\"\n    [SERVICEREQUEST]=\"false\"\n    [PAYMENT_GROUP_REF]=\"null\"\n    [EXC_REFERENCE]=\"caseReference\"\n    [DCN_NUMBER]=\"null\"\n    [ISPAYMENTSTATUSENABLED]=\"'Enable'\"\n></ccpay-payment-lib>", styles: [".govuk-warning-text{margin-top:20px;margin-bottom:-20px}\n"] }]
    }], () => [{ type: i1.AbstractAppConfig }, { type: i2.SessionStorageService }], null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CasePaymentHistoryViewerFieldComponent, { className: "CasePaymentHistoryViewerFieldComponent", filePath: "lib/shared/components/palette/payment/case-payment-history-viewer-field.component.ts", lineNumber: 11 }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FzZS1wYXltZW50LWhpc3Rvcnktdmlld2VyLWZpZWxkLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NjZC1jYXNlLXVpLXRvb2xraXQvc3JjL2xpYi9zaGFyZWQvY29tcG9uZW50cy9wYWxldHRlL3BheW1lbnQvY2FzZS1wYXltZW50LWhpc3Rvcnktdmlld2VyLWZpZWxkLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NjZC1j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