import { Component, Input } from '@angular/core';
import { Link } from '../../../../forms/page/widgets/link';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/material/icon";
function WebLinkWidgetViewComponent_ng_container_1_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵelementStart(2, "span", 8);
    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 WebLinkWidgetViewComponent_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, WebLinkWidgetViewComponent_ng_container_1_span_3_Template, 4, 1, "span", 5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "div", 6);
    i0.ɵɵelementStart(5, "a", 7);
    i0.ɵɵtext(6);
    i0.ɵɵelementEnd();
    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.ɵɵpropertyInterpolate("href", ctx_r0.widget.value, i0.ɵɵsanitizeUrl);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r0.widget.value);
} }
function WebLinkWidgetViewComponent_ng_template_2_span_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵelementStart(2, "span", 8);
    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 WebLinkWidgetViewComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 3);
    i0.ɵɵelement(1, "mat-icon", 4);
    i0.ɵɵtemplate(2, WebLinkWidgetViewComponent_ng_template_2_span_2_Template, 4, 1, "span", 5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "span", 9);
    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 WebLinkWidgetViewComponent {
    //widgetValue: TextValue;
    constructor() { }
    ngOnInit() {
        // this.widgetValue = new TextValue();
        ////this.widgetValue = this.widget.value as string;
    }
}
WebLinkWidgetViewComponent.ɵfac = function WebLinkWidgetViewComponent_Factory(t) { return new (t || WebLinkWidgetViewComponent)(); };
WebLinkWidgetViewComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WebLinkWidgetViewComponent, selectors: [["lib-web-link-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_hyperlink", 1, "add-text"], [4, "ngIf"], [1, "data-detail-text", "text-sm"], ["target", "_blank", "rel", "noopener noreferrer", 3, "href"], [1, "colon"], [1, "flex", "justify-start"]], template: function WebLinkWidgetViewComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵtemplate(1, WebLinkWidgetViewComponent_ng_container_1_Template, 7, 3, "ng-container", 1);
        i0.ɵɵtemplate(2, WebLinkWidgetViewComponent_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)("ngIfElse", _r1);
    } }, directives: [i1.NgIf, i2.MatIcon], styles: [""] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WebLinkWidgetViewComponent, [{
        type: Component,
        args: [{ selector: 'lib-web-link-widget-view', template: "\n      <div class=\"data-detail-info\">\n        <ng-container *ngIf=\"widget.value; else isWidgetValueEmpty\" >\n          <div class=\"data-detail-title flex text-sm\"><mat-icon class=\"add-text\" svgIcon=\"axo_hyperlink\"></mat-icon> <span *ngIf=\"section.showPrompt\">{{widget.prompt}}<span class=\"colon\">:</span></span>\n          </div>\n          <div class=\"data-detail-text text-sm\">\n              <a href=\"{{widget.value}}\" target=\"_blank\" rel=\"noopener noreferrer\">{{widget.value}}</a>\n          </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_hyperlink\"></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\n", styles: [""] }]
    }], function () { return []; }, { widget: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2ViLWxpbmstd2lkZ2V0LXZpZXcuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2F4LWNvbW1vbi11aS1saWIvc3JjL2xpYi9mb3JtLW9iamVjdC9mb3JtLW9iamVjdC12aWV3L2Zvcm0tb2JqZWN0LXdpZGdldHMvd2ViLWxpbmstd2lkZ2V0LXZpZXcvd2ViLWxpbmstd2lkZ2V0LXZpZXcuY29tcG9u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