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());
    }
}
CommunicationValueViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: CommunicationValueViewComponent, deps: [{ token: i1.MatomoService }], target: i0.ɵɵFactoryTarget.Component });
CommunicationValueViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", 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\"\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"], 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: "15.1.5", 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\"\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"] }]
        }], ctorParameters: function () { return [{ type: i1.MatomoService }]; } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbXVuaWNhdGlvbi12YWx1ZS12aWV3LmNvbXBvbmVudC5qcyIsInNvdX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