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 "@angular/common";
import * as i4 from "@hmcts/ccpay-web-component";
function WaysToPayFieldComponent_ccpay_payment_lib_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "ccpay-payment-lib", 1);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("API_ROOT", ctx_r0.getBaseURL())("BULKSCAN_API_ROOT", ctx_r0.getPayBulkScanBaseURL())("REFUNDS_API_ROOT", ctx_r0.getRefundsUrl())("NOTIFICATION_API_ROOT", ctx_r0.getNotificationUrl())("CCD_CASE_NUMBER", ctx_r0.caseReference)("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", true)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx_r0.caseReference)("DCN_NUMBER", null)("SELECTED_OPTION", "CCDorException")("LOGGEDINUSERROLES", ctx_r0.getUserRoles())("CARDPAYMENTRETURNURL", ctx_r0.getCardPaymentReturnUrl())("ISPAYMENTSTATUSENABLED", "Enable");
} }
export class WaysToPayFieldComponent extends PaymentField {
    constructor(appConfig, sessionStorage) {
        super(appConfig, sessionStorage);
    }
    getCardPaymentReturnUrl() {
        return this.appConfig.getPaymentReturnUrl();
    }
    static ɵfac = function WaysToPayFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || WaysToPayFieldComponent)(i0.ɵɵdirectiveInject(i1.AbstractAppConfig), i0.ɵɵdirectiveInject(i2.SessionStorageService)); };
    static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WaysToPayFieldComponent, selectors: [["ccd-ways-to-pay-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "NOTIFICATION_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED", 4, "ngIf"], [3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "NOTIFICATION_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED"]], template: function WaysToPayFieldComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵtemplate(0, WaysToPayFieldComponent_ccpay_payment_lib_0_Template, 1, 15, "ccpay-payment-lib", 0);
        } if (rf & 2) {
            i0.ɵɵproperty("ngIf", ctx.getUserRoles().length > 0);
        } }, dependencies: [i3.NgIf, i4.PaymentLibComponent], encapsulation: 2 });
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WaysToPayFieldComponent, [{
        type: Component,
        args: [{ selector: 'ccd-ways-to-pay-field', template: "<ccpay-payment-lib *ngIf=\"getUserRoles().length > 0\"\n    [API_ROOT]=\"getBaseURL()\"\n    [BULKSCAN_API_ROOT]=\"getPayBulkScanBaseURL()\"\n    [REFUNDS_API_ROOT]=\"getRefundsUrl()\"\n    [NOTIFICATION_API_ROOT]=\"getNotificationUrl()\"\n    [CCD_CASE_NUMBER]=\"caseReference\"\n    [VIEW]=\"'case-transactions'\"\n    [TAKEPAYMENT]=\"false\"\n    [SERVICEREQUEST]=\"true\"\n    [PAYMENT_GROUP_REF]=\"null\"\n    [EXC_REFERENCE]=\"caseReference\"\n    [DCN_NUMBER]=\"null\"\n    [SELECTED_OPTION]=\"'CCDorException'\"\n    [LOGGEDINUSERROLES]=\"getUserRoles()\"\n    [CARDPAYMENTRETURNURL]=\"getCardPaymentReturnUrl()\"\n    [ISPAYMENTSTATUSENABLED]=\"'Enable'\"\n></ccpay-payment-lib>" }]
    }], () => [{ type: i1.AbstractAppConfig }, { type: i2.SessionStorageService }], null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WaysToPayFieldComponent, { className: "WaysToPayFieldComponent", filePath: "lib/shared/components/palette/waystopay/waystopay-field.component.ts", lineNumber: 10 }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2F5c3RvcGF5LWZpZWxkLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NjZC1jYXNlLXVpLXRvb2xraXQvc3JjL2xpYi9zaGFyZWQvY29tcG9uZW50cy9wYWxldHRlL3dheXN0b3BheS93YXlzdG9wYXktZmllbGQuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY2NkLWNhc2UtdWktdG9vbGtpdC9zcmMvbGliL3NoYXJlZC9jb21wb25lbnRzL3BhbGV0dGUvd2F5c3RvcGF5L3dheXN0b3BheS1maWVsZC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzFDLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQzNELE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLG1EQUFtRCxDQUFDO0FBQzFGLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSx1Q0FBdUMsQ0FBQzs7Ozs7OztJQ0hyRS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