import { Component, Input } from '@angular/core';
import { Language } from '../../../../forms/page/widgets/languages';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/material/icon";
function LanguageWidgetViewComponent_ng_container_0_span_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵelementStart(2, "span", 5);
    i0.ɵɵtext(3, ":");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r1.widget.prompt);
} }
function LanguageWidgetViewComponent_ng_container_0_ng_container_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "span", 6);
    i0.ɵɵtext(2, "-");
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} }
function LanguageWidgetViewComponent_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, LanguageWidgetViewComponent_ng_container_0_span_4_Template, 4, 1, "span", 0);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 4);
    i0.ɵɵtext(6);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(7, LanguageWidgetViewComponent_ng_container_0_ng_container_7_Template, 3, 0, "ng-container", 0);
    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.widgetValue, "");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", !ctx_r0.widgetValue);
} }
export class LanguageWidgetViewComponent {
    constructor() { }
    ngOnInit() {
        this.ChangeValueToLanguageName();
    }
    ChangeValueToLanguageName() {
        if (this.widget.value) {
            this.widgetValue = ((typeof this.widget.value) === "object") ? this.widget.value["name"] : this.widget.value[0].name;
        }
    }
}
LanguageWidgetViewComponent.ɵfac = function LanguageWidgetViewComponent_Factory(t) { return new (t || LanguageWidgetViewComponent)(); };
LanguageWidgetViewComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LanguageWidgetViewComponent, selectors: [["lib-language-widget-view"]], inputs: { widget: "widget" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "data-detail-info"], [1, "data-detail-title", "flex", "text-sm"], ["svgIcon", "axo_text", 1, "add-text"], [1, "data-detail-text", "text-sm"], [1, "colon"], [1, "flex", "justify-start"]], template: function LanguageWidgetViewComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵtemplate(0, LanguageWidgetViewComponent_ng_container_0_Template, 8, 3, "ng-container", 0);
    } if (rf & 2) {
        i0.ɵɵproperty("ngIf", ctx.widget.value);
    } }, directives: [i1.NgIf, i2.MatIcon], styles: [""] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LanguageWidgetViewComponent, [{
        type: Component,
        args: [{ selector: 'lib-language-widget-view', template: "\n<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_text\"></mat-icon> <span *ngIf=\"section.showPrompt\">{{widget.prompt}}<span class=\"colon\">:</span></span>\n      </div>\n      <div class=\"data-detail-text text-sm\"> {{widgetValue}}</div> \n  </div>\n\n<ng-container *ngIf=\"!widgetValue\" >\n    <span class=\"flex justify-start\">-</span>\n  </ng-container>\n\n", styles: [""] }]
    }], function () { return []; }, { widget: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJma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