import { Component } from '@angular/core';
import { AbstractFieldReadComponent } from '../base-field/abstract-field-read.component';
import { YesNoService } from './yes-no.service';
import * as i0 from "@angular/core";
import * as i1 from "./yes-no.service";
import * as i2 from "rpx-xui-translation";
export class ReadYesNoFieldComponent extends AbstractFieldReadComponent {
    yesNoService;
    formattedValue;
    constructor(yesNoService) {
        super();
        this.yesNoService = yesNoService;
    }
    ngOnInit() {
        super.ngOnInit();
        this.formattedValue = this.yesNoService.format(this.caseField.value);
    }
    static ɵfac = function ReadYesNoFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadYesNoFieldComponent)(i0.ɵɵdirectiveInject(i1.YesNoService)); };
    static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadYesNoFieldComponent, selectors: [["ccd-read-yes-no-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 5, consts: [[1, "text-16"]], template: function ReadYesNoFieldComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "span", 0);
            i0.ɵɵtext(1);
            i0.ɵɵpipe(2, "rpxTranslate");
            i0.ɵɵelementEnd();
        } if (rf & 2) {
            i0.ɵɵadvance();
            i0.ɵɵtextInterpolate(ctx.formattedValue ? i0.ɵɵpipeBind3(2, 1, ctx.formattedValue, null, ctx.formattedValue) : null);
        } }, dependencies: [i2.RpxTranslatePipe], encapsulation: 2 });
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadYesNoFieldComponent, [{
        type: Component,
        args: [{
                selector: 'ccd-read-yes-no-field',
                template: `<span class="text-16">{{formattedValue ? (formattedValue | rpxTranslate : null : formattedValue) : null}}</span>`
            }]
    }], () => [{ type: i1.YesNoService }], null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadYesNoFieldComponent, { className: "ReadYesNoFieldComponent", filePath: "lib/shared/components/palette/yes-no/read-yes-no-field.component.ts", lineNumber: 9 }); })();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