import { Component } from '@angular/core';
import { AbstractFieldReadComponent } from '../base-field/abstract-field-read.component';
import * as i0 from "@angular/core";
function ReadOrderSummaryFieldComponent_tr_18_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "tr", 5);
} if (rf & 2) {
    const feeValue_r1 = ctx.$implicit;
    i0.ɵɵproperty("feeValue", feeValue_r1);
} }
export class ReadOrderSummaryFieldComponent extends AbstractFieldReadComponent {
    getFees() {
        return this.caseField.value ? this.caseField.value.Fees : [];
    }
    getPaymentTotal() {
        return this.caseField.value ? this.caseField.value.PaymentTotal : '';
    }
    static ɵfac = /*@__PURE__*/ (() => { let ɵReadOrderSummaryFieldComponent_BaseFactory; return function ReadOrderSummaryFieldComponent_Factory(__ngFactoryType__) { return (ɵReadOrderSummaryFieldComponent_BaseFactory || (ɵReadOrderSummaryFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadOrderSummaryFieldComponent)))(__ngFactoryType__ || ReadOrderSummaryFieldComponent); }; })();
    static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadOrderSummaryFieldComponent, selectors: [["ccd-read-order-summary-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 26, vars: 20, consts: [[1, "order-summary-title"], ["id", "hiddenHeader", 2, "display", "none"], ["ccdReadOrderSummaryRow", "", 3, "feeValue", 4, "ngFor", "ngForOf"], [1, "payment-total"], [3, "amount"], ["ccdReadOrderSummaryRow", "", 3, "feeValue"]], template: function ReadOrderSummaryFieldComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0);
            i0.ɵɵtext(1);
            i0.ɵɵpipe(2, "rpxTranslate");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(3, "table");
            i0.ɵɵpipe(4, "rpxTranslate");
            i0.ɵɵelementStart(5, "thead")(6, "tr");
            i0.ɵɵelement(7, "th", 1);
            i0.ɵɵelementStart(8, "td");
            i0.ɵɵtext(9);
            i0.ɵɵpipe(10, "rpxTranslate");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(11, "td");
            i0.ɵɵtext(12);
            i0.ɵɵpipe(13, "rpxTranslate");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(14, "td");
            i0.ɵɵtext(15);
            i0.ɵɵpipe(16, "rpxTranslate");
            i0.ɵɵelementEnd()()();
            i0.ɵɵelementStart(17, "tbody");
            i0.ɵɵtemplate(18, ReadOrderSummaryFieldComponent_tr_18_Template, 1, 1, "tr", 2);
            i0.ɵɵelementStart(19, "tr");
            i0.ɵɵelement(20, "td");
            i0.ɵɵelementStart(21, "td", 3);
            i0.ɵɵtext(22);
            i0.ɵɵpipe(23, "rpxTranslate");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(24, "td");
            i0.ɵɵelement(25, "ccd-read-money-gbp-field", 4);
            i0.ɵɵelementEnd()()()();
        } if (rf & 2) {
            i0.ɵɵadvance();
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 8, "Order Summary"));
            i0.ɵɵadvance(2);
            i0.ɵɵattribute("aria-describedby", i0.ɵɵpipeBind1(4, 10, "order summary table"));
            i0.ɵɵadvance(6);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(10, 12, "Code"));
            i0.ɵɵadvance(3);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(13, 14, "Description"));
            i0.ɵɵadvance(3);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(16, 16, "Amount"));
            i0.ɵɵadvance(3);
            i0.ɵɵproperty("ngForOf", ctx.getFees());
            i0.ɵɵadvance(4);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(23, 18, "Total"));
            i0.ɵɵadvance(3);
            i0.ɵɵproperty("amount", ctx.getPaymentTotal());
        } }, styles: [".order-summary-title[_ngcontent-%COMP%]{border:0;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:18px;line-height:1.2}@media (min-width: 641px){.order-summary-title[_ngcontent-%COMP%]{font-size:24px;line-height:1.25}}table[_ngcontent-%COMP%]{margin-bottom:23px}table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{margin:0;border-bottom:1px solid #0b0c0c;padding-top:41px;padding-bottom:36px;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:14px;line-height:1.1428571429}@media (min-width: 641px){table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{font-size:16px;line-height:1.25}}table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:nth-child(3){text-align:right}table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding-top:12px;padding-bottom:12px;margin:0;border-bottom:1px solid #0b0c0c;font-family:nta,Arial,sans-serif;font-weight:400;text-transform:none;font-size:14px;line-height:1.1428571429}@media (min-width: 641px){table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{font-size:16px;line-height:1.25}}table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:nth-child(1){width:20px}table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:nth-child(2){width:70%}table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:nth-child(3){text-align:right;width:10%}table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:last-child   td[_ngcontent-%COMP%]:nth-child(1){border-bottom:0px}table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:last-child   td[_ngcontent-%COMP%]:nth-child(2){font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:14px;line-height:1.1428571429;text-align:right;border-bottom:0px}@media (min-width: 641px){table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:last-child   td[_ngcontent-%COMP%]:nth-child(2){font-size:16px;line-height:1.25}}"] });
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadOrderSummaryFieldComponent, [{
        type: Component,
        args: [{ selector: 'ccd-read-order-summary-field', template: "<div class=\"order-summary-title\">{{'Order Summary' | rpxTranslate}}</div>\n<table [attr.aria-describedby]=\"'order summary table' | rpxTranslate\">\n    <thead>\n      <tr>\n        <th id=\"hiddenHeader\" style=\"display: none;\"></th>\n        <td>{{'Code' | rpxTranslate}}</td>\n        <td>{{'Description' | rpxTranslate}}</td>\n        <td>{{'Amount' | rpxTranslate}}</td>\n      </tr>\n    </thead>\n    <tbody>\n        <tr ccdReadOrderSummaryRow *ngFor=\"let feeValue of getFees()\" [feeValue]=\"feeValue\"></tr>\n        <tr>\n            <td></td>\n            <td class=\"payment-total\">{{'Total' | rpxTranslate}}</td>\n            <td><ccd-read-money-gbp-field [amount]=\"getPaymentTotal()\"></ccd-read-money-gbp-field></td>\n        </tr>\n    </tbody>\n</table>\n", styles: [".order-summary-title{border:0;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:18px;line-height:1.2}@media (min-width: 641px){.order-summary-title{font-size:24px;line-height:1.25}}table{margin-bottom:23px}table thead tr td{margin:0;border-bottom:1px solid #0b0c0c;padding-top:41px;padding-bottom:36px;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:14px;line-height:1.1428571429}@media (min-width: 641px){table thead tr td{font-size:16px;line-height:1.25}}table thead tr td:nth-child(3){text-align:right}table tbody tr td{padding-top:12px;padding-bottom:12px;margin:0;border-bottom:1px solid #0b0c0c;font-family:nta,Arial,sans-serif;font-weight:400;text-transform:none;font-size:14px;line-height:1.1428571429}@media (min-width: 641px){table tbody tr td{font-size:16px;line-height:1.25}}table tbody tr td:nth-child(1){width:20px}table tbody tr td:nth-child(2){width:70%}table tbody tr td:nth-child(3){text-align:right;width:10%}table tbody tr:last-child td:nth-child(1){border-bottom:0px}table tbody tr:last-child td:nth-child(2){font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:14px;line-height:1.1428571429;text-align:right;border-bottom:0px}@media (min-width: 641px){table tbody tr:last-child td:nth-child(2){font-size:16px;line-height:1.25}}\n"] }]
    }], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadOrderSummaryFieldComponent, { className: "ReadOrderSummaryFieldComponent", filePath: "lib/shared/components/palette/order-summary/read-order-summary-field.component.ts", lineNumber: 12 }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVhZC1vcmRlci1zdW1tYXJ5LWZpZWxkLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NjZC1jYXNlLXVpLXRvb2xraXQvc3JjL2xpYi9zaGFyZWQvY29tcG9uZW50cy9wYWxldHRlL29yZGVyLXN1bW1hcnkvcmVhZC1vcmRlci1zdW1tYXJ5LWZpZWxkLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NjZC1jYXNlLXVpLXRvb2xraXQvc3JjL2xpYi9zaGFyZWQvY29tcG9uZW50cy9wYWxldHRlL29yZGVyLXN1bW1hcnkvcmVhZC1vcmRlci1zdW1tYXJ5LWZpZWxkLmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMxQyxPQUFPLEVBQUUsMEJBQTBCLEVBQUUsTUFB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