import { ChangeDetectionStrategy, Component } from '@angular/core';
import { MatomoService, propertyCommunicationType } from '@aztrix/helpers';
import { AbstractPropertyValueViewComponent } from '../abstract-property-value-view.component';
import * as i0 from "@angular/core";
import * as i1 from "@aztrix/helpers";
import * as i2 from "@angular/common";
import * as i3 from "./address-value-view/address-value-view.component";
import * as i4 from "../default-value-view/default-value-view.component";
export class CommunicationValueViewComponent extends AbstractPropertyValueViewComponent {
    constructor(_matomo) {
        super();
        this._matomo = _matomo;
    }
    trackClick() {
        this._matomo.trackEvent('Communication value', 'click', propertyCommunicationType(this.property)?.toLowerCase());
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CommunicationValueViewComponent, deps: [{ token: i1.MatomoService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CommunicationValueViewComponent, selector: "ax-communication-value-view", usesInheritance: true, ngImport: i0, template: "<ng-template #view>\n  <ax-address-value-view\n    *ngIf=\"property | propertyIsAddressRelated\"\n    [property]=\"property\"\n    [showVerificationLabel]=\"showVerificationLabel\"\n    [clickable]=\"false\"\n  ></ax-address-value-view>\n  <ax-default-value-view\n    *ngIf=\"!(property | propertyIsAddressRelated)\"\n    [property]=\"property\"\n    [showVerificationLabel]=\"showVerificationLabel\"\n    [clickable]=\"false\"\n  ></ax-default-value-view>\n</ng-template>\n\n<ng-container *ngIf=\"clickable; else view\">\n  <a\n    class=\"c-card__property__link\"\n    [href]=\"property | propertyCommunicationHref: undefined : params || undefined\"\n    [target]=\"property | propertyCommunicationTarget\"\n    (click)=\"trackClick()\"\n  >\n    <ng-container *ngTemplateOutlet=\"view\"></ng-container>\n  </a>\n</ng-container>\n", styles: [".property-value{font-size:16px;font-weight:700}\n", ":host{word-break:break-all}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3.AddressValueViewComponent, selector: "ax-address-value-view" }, { kind: "component", type: i4.DefaultValueViewComponent, selector: "ax-default-value-view" }, { kind: "pipe", type: i1.PropertyCommunicationHrefPipe, name: "propertyCommunicationHref" }, { kind: "pipe", type: i1.PropertyCommunicationTargetPipe, name: "propertyCommunicationTarget" }, { kind: "pipe", type: i1.PropertyIsAddressRelatedPipe, name: "propertyIsAddressRelated" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CommunicationValueViewComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-communication-value-view', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #view>\n  <ax-address-value-view\n    *ngIf=\"property | propertyIsAddressRelated\"\n    [property]=\"property\"\n    [showVerificationLabel]=\"showVerificationLabel\"\n    [clickable]=\"false\"\n  ></ax-address-value-view>\n  <ax-default-value-view\n    *ngIf=\"!(property | propertyIsAddressRelated)\"\n    [property]=\"property\"\n    [showVerificationLabel]=\"showVerificationLabel\"\n    [clickable]=\"false\"\n  ></ax-default-value-view>\n</ng-template>\n\n<ng-container *ngIf=\"clickable; else view\">\n  <a\n    class=\"c-card__property__link\"\n    [href]=\"property | propertyCommunicationHref: undefined : params || undefined\"\n    [target]=\"property | propertyCommunicationTarget\"\n    (click)=\"trackClick()\"\n  >\n    <ng-container *ngTemplateOutlet=\"view\"></ng-container>\n  </a>\n</ng-container>\n", styles: [".property-value{font-size:16px;font-weight:700}\n", ":host{word-break:break-all}\n"] }]
        }], ctorParameters: () => [{ type: i1.MatomoService }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbXVuaWNhdGlvbi12YWx1ZS12aWV3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