import { Component, Input } from '@angular/core';
import { Toggle } from '../../../../forms/page/widgets/toggle';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/material/icon";
function ToggleWidgetViewComponent_ng_container_1_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵelementStart(2, "span", 7);
    i0.ɵɵtext(3, ":");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r3.widget.prompt);
} }
function ToggleWidgetViewComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "div", 3);
    i0.ɵɵelement(2, "mat-icon", 4);
    i0.ɵɵtemplate(3, ToggleWidgetViewComponent_ng_container_1_span_3_Template, 4, 1, "span", 5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "div", 6);
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", ctx_r0.section.showPrompt);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", ctx_r0.widgetValue, "");
} }
function ToggleWidgetViewComponent_ng_template_2_span_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵelementStart(2, "span", 7);
    i0.ɵɵtext(3, ":");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r4.widget.prompt);
} }
function ToggleWidgetViewComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 3);
    i0.ɵɵelement(1, "mat-icon", 4);
    i0.ɵɵtemplate(2, ToggleWidgetViewComponent_ng_template_2_span_2_Template, 4, 1, "span", 5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "span", 8);
    i0.ɵɵtext(4, "-");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r2.section.showPrompt);
} }
export class ToggleWidgetViewComponent {
    constructor() { }
    ngOnInit() {
        this.widgetValue = this.widget.value === true ? "Yes" : "No";
    }
}
ToggleWidgetViewComponent.ɵfac = function ToggleWidgetViewComponent_Factory(t) { return new (t || ToggleWidgetViewComponent)(); };
ToggleWidgetViewComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ToggleWidgetViewComponent, selectors: [["lib-toggle-widget-view"]], inputs: { widget: "widget" }, decls: 4, vars: 2, consts: [[1, "data-detail-info"], [4, "ngIf", "ngIfElse"], ["isWidgetValueEmpty", ""], [1, "data-detail-title", "flex", "text-sm"], ["svgIcon", "axo_toggle_button", 1, "add-text"], [4, "ngIf"], [1, "data-detail-text", "text-sm"], [1, "colon"], [1, "flex", "justify-start"]], template: function ToggleWidgetViewComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵtemplate(1, ToggleWidgetViewComponent_ng_container_1_Template, 6, 2, "ng-container", 1);
        i0.ɵɵtemplate(2, ToggleWidgetViewComponent_ng_template_2_Template, 5, 1, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        const _r1 = i0.ɵɵreference(3);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.widget.value != null)("ngIfElse", _r1);
    } }, directives: [i1.NgIf, i2.MatIcon], styles: [""] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ToggleWidgetViewComponent, [{
        type: Component,
        args: [{ selector: 'lib-toggle-widget-view', template: "\n<div class=\"data-detail-info\">\n    <ng-container *ngIf=\"widget.value != null; else isWidgetValueEmpty\" >\n        <div class=\"data-detail-title flex text-sm\">\n            <mat-icon class=\"add-text\" svgIcon=\"axo_toggle_button\"></mat-icon> \n            <span *ngIf=\"section.showPrompt\">{{widget.prompt}}<span class=\"colon\">:</span></span>\n        </div>\n        <div class=\"data-detail-text text-sm\"> {{widgetValue}}</div> \n    </ng-container>\n    <ng-template #isWidgetValueEmpty>\n        <div class=\"data-detail-title flex text-sm\">\n            <mat-icon class=\"add-text\" svgIcon=\"axo_toggle_button\"></mat-icon> \n            <span *ngIf=\"section.showPrompt\">{{widget.prompt}}<span class=\"colon\">:</span></span>\n        </div>\n        <span class=\"flex justify-start\">-</span>\n\n    </ng-template>\n</div>\n", styles: [""] }]
    }], function () { return []; }, { widget: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9nZ2xlLXdpZGdldC12aWV3LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9heC1jb21tb24tdWktbGliL3NyYy9saWIvZm9ybS1vYmplY3QvZm9ybS1vYmplY3Qtdmlldy9mb3JtLW9iamVjdC13aWRnZXRzL3RvZ2dsZS13aWRnZXQtdmlldy90b2dnbGUtd2lkZ2V0LXZpZXcuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2F4LWNvbW1vbi11aS1saWIvc3JjL2xpYi9mb3JtLW9iamVjdC9mb3JtLW9iamVjdC12aWV3L2Zvcm0tb2JqZWN0LXdpZGdldHMvdG9nZ2xlLXdpZGdldC12aWV3L3RvZ2dsZS13aWRnZXQtdmlldy5jb21wb25lbnQuaHRtbCJdLCJuYW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