import { Component, Input } from '@angular/core';
import { Formula } from '../../../../forms/page/widgets/formula';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/material/icon";
function FormulaWidgetViewComponent_ng_container_0_span_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵelementStart(2, "span", 6);
    i0.ɵɵtext(3, ":");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r2.widget.prompt);
} }
function FormulaWidgetViewComponent_ng_container_0_span_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 7);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r3.widget.unit);
} }
function FormulaWidgetViewComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "div", 1);
    i0.ɵɵelementStart(2, "div", 2);
    i0.ɵɵelement(3, "mat-icon", 3);
    i0.ɵɵtemplate(4, FormulaWidgetViewComponent_ng_container_0_span_4_Template, 4, 1, "span", 0);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 4);
    i0.ɵɵtext(6);
    i0.ɵɵtemplate(7, FormulaWidgetViewComponent_ng_container_0_span_7_Template, 2, 1, "span", 5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("ngIf", ctx_r0.section.showPrompt);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", ctx_r0.widget.value, " ");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.widget.unit && ctx_r0.widget.value != "-");
} }
function FormulaWidgetViewComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "span", 8);
    i0.ɵɵtext(2, "-");
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} }
export class FormulaWidgetViewComponent {
    constructor() { }
    ngOnInit() {
    }
}
FormulaWidgetViewComponent.ɵfac = function FormulaWidgetViewComponent_Factory(t) { return new (t || FormulaWidgetViewComponent)(); };
FormulaWidgetViewComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FormulaWidgetViewComponent, selectors: [["lib-formula-widget-view"]], inputs: { widget: "widget" }, decls: 2, vars: 2, consts: [[4, "ngIf"], [1, "data-detail-info"], [1, "data-detail-title", "flex", "text-sm"], ["svgIcon", "axo_formula", 1, "add-text"], [1, "data-detail-text", "text-sm"], ["class", "pl-1", 4, "ngIf"], [1, "colon"], [1, "pl-1"], [1, "flex", "justify-start"]], template: function FormulaWidgetViewComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵtemplate(0, FormulaWidgetViewComponent_ng_container_0_Template, 8, 3, "ng-container", 0);
        i0.ɵɵtemplate(1, FormulaWidgetViewComponent_ng_container_1_Template, 3, 0, "ng-container", 0);
    } if (rf & 2) {
        i0.ɵɵproperty("ngIf", ctx.widget.value);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", !ctx.widget.value);
    } }, directives: [i1.NgIf, i2.MatIcon], styles: [""] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormulaWidgetViewComponent, [{
        type: Component,
        args: [{ selector: 'lib-formula-widget-view', template: "<ng-container *ngIf=\"widget.value\" >\n<div class=\"data-detail-info\">\n    <div class=\"data-detail-title flex text-sm\"><mat-icon class=\"add-text\" svgIcon=\"axo_formula\"></mat-icon> <span *ngIf=\"section.showPrompt\">{{widget.prompt}}<span class=\"colon\">:</span></span>\n    </div>\n    <div class=\"data-detail-text text-sm\" > {{widget.value}}\n        <span class=\"pl-1\" *ngIf=\" widget.unit && widget.value != '-'\">{{widget.unit}}</span>\n    </div> \n</div>\n</ng-container>\n<ng-container *ngIf=\"!widget.value\" >\n    <span class=\"flex justify-start\">-</span>\n </ng-container>", styles: [""] }]
    }], function () { return []; }, { widget: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybXVsYS13aWRnZXQtdmlldy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXgtY29tbW9uLXVpLWxpYi9zcmMvbGliL2Zvcm0tb2JqZWN0L2Zvcm0tb2JqZWN0LXZpZXcvZm9ybS1vYmplY3Qtd2lkZ2V0cy9mb3JtdWxhLXdpZGdldC12aWV3L2Zvcm11bGEtd2lkZ2V0LXZpZXcuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2F4LWNvbW1vbi11aS1saWIvc3JjL2xpYi9mb3JtLW9iamVjdC9mb3JtLW9iamVjdC12aWV3L2Zvcm0tb2JqZWN0LXdpZGdldHMvZm9ybXVsYS13aWRnZXQtdmlldy9mb3JtdWxhLXdpZGdldC12aWV3LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFVLE1BQU0sZUFBZSxDQUFDO0FBQ3pELE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSx3Q0FBd0MsQ0FBQzs7Ozs7SUNDNEMsNEJBQWlDO0lBQUEsWUFBaUI7SUFBQSwrQkFBb0I7SUFBQSxpQkFBQztJQUFBLGlCQUFPO0lBQUEsaUJBQU87OztJQUFwRCxl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