import { Component, Input } from '@angular/core';
import { AbstractFieldReadComponent } from '../base-field/abstract-field-read.component';
import { FeeValue } from './fee-value.model';
import * as i0 from "@angular/core";
const _c0 = ["ccdReadOrderSummaryRow", ""];
export class ReadOrderSummaryRowComponent extends AbstractFieldReadComponent {
    feeValue;
    ngOnInit() {
        // We don't want to register this if we don't have a caseField
        if (this.caseField) {
            super.ngOnInit();
        }
    }
    getFeeAmount() {
        return this.feeValue.value ? this.feeValue.value.FeeAmount : '';
    }
    static ɵfac = /*@__PURE__*/ (() => { let ɵReadOrderSummaryRowComponent_BaseFactory; return function ReadOrderSummaryRowComponent_Factory(__ngFactoryType__) { return (ɵReadOrderSummaryRowComponent_BaseFactory || (ɵReadOrderSummaryRowComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadOrderSummaryRowComponent)))(__ngFactoryType__ || ReadOrderSummaryRowComponent); }; })();
    static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadOrderSummaryRowComponent, selectors: [["", "ccdReadOrderSummaryRow", ""]], inputs: { feeValue: "feeValue" }, features: [i0.ɵɵInheritDefinitionFeature], attrs: _c0, decls: 7, vars: 5, consts: [[3, "amount"]], template: function ReadOrderSummaryRowComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "td");
            i0.ɵɵtext(1);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(2, "td");
            i0.ɵɵtext(3);
            i0.ɵɵpipe(4, "rpxTranslate");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(5, "td");
            i0.ɵɵelement(6, "ccd-read-money-gbp-field", 0);
            i0.ɵɵelementEnd();
        } if (rf & 2) {
            i0.ɵɵadvance();
            i0.ɵɵtextInterpolate(ctx.feeValue.value.FeeCode);
            i0.ɵɵadvance(2);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 3, ctx.feeValue.value.FeeDescription));
            i0.ɵɵadvance(3);
            i0.ɵɵproperty("amount", ctx.getFeeAmount());
        } }, styles: ["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){td[_ngcontent-%COMP%]{font-size:16px;line-height:1.25}}td[_ngcontent-%COMP%]:nth-child(1){width:20px}td[_ngcontent-%COMP%]:nth-child(2){width:70%}td[_ngcontent-%COMP%]:nth-child(3){text-align:right;width:10%}"] });
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadOrderSummaryRowComponent, [{
        type: Component,
        args: [{ selector: '[ccdReadOrderSummaryRow]', template: "<td>{{feeValue.value.FeeCode}}</td>\n<td>{{feeValue.value.FeeDescription | rpxTranslate}}</td>\n<td><ccd-read-money-gbp-field [amount]=\"getFeeAmount()\"></ccd-read-money-gbp-field></td>\n", styles: ["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){td{font-size:16px;line-height:1.25}}td:nth-child(1){width:20px}td:nth-child(2){width:70%}td:nth-child(3){text-align:right;width:10%}\n"] }]
    }], null, { feeValue: [{
            type: Input
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadOrderSummaryRowComponent, { className: "ReadOrderSummaryRowComponent", filePath: "lib/shared/components/palette/order-summary/read-order-summary-row.component.ts", lineNumber: 13 }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVhZC1vcmRlci1zdW1tYXJ5LXJvdy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jY2QtY2FzZS11aS10b29sa2l0L3NyYy9saWIvc2hhcmVkL2NvbXBv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