import { ChangeDetectionStrategy, Component, Input, } from '@angular/core';
import { MatIconModule } from '@angular/material/icon';
import { MatTooltipModule } from '@angular/material/tooltip';
import { NgIf, NgSwitch, NgSwitchCase, NgSwitchDefault, } from '@angular/common';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/tooltip";
import * as i2 from "@angular/material/icon";
export class LinkCellComponent {
    constructor() {
        this.short = true;
    }
    get href() {
        if (this.protocol) {
            return [this.protocol, this.value].join(':');
        }
        return this.value;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: LinkCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.6", type: LinkCellComponent, isStandalone: true, selector: "td[rxap-link-cell]", inputs: { value: ["rxap-link-cell", "value"], protocol: "protocol", short: "short" }, ngImport: i0, template: "<a *ngIf=\"value\" [href]=\"href\" [matTooltip]=\"value\" class=\"link\" target=\"_blank\">\n  <span class=\"flex flex-row items-center gap-2\">\n    <span *ngIf=\"short\" class=\"content grow-0\" i18n>Open</span>\n    <ng-container [ngSwitch]=\"protocol\">\n      <mat-icon *ngSwitchCase=\"'tel'\" class=\"grow-0\">call</mat-icon>\n      <mat-icon *ngSwitchCase=\"'mailto'\" class=\"grow-0\">email</mat-icon>\n      <mat-icon *ngSwitchDefault class=\"grow-0\">launch</mat-icon>\n    </ng-container>\n    <span *ngIf=\"!short\" class=\"content grow-0\">{{value}}</span>\n  </span>\n</a>\n<ng-content></ng-content>\n", styles: [".link{text-decoration:none;color:inherit}.link .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgSwitchDefault, selector: "[ngSwitchDefault]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: LinkCellComponent, decorators: [{
            type: Component,
            args: [{ selector: 'td[rxap-link-cell]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgIf, MatTooltipModule, NgSwitch, NgSwitchCase, MatIconModule, NgSwitchDefault], template: "<a *ngIf=\"value\" [href]=\"href\" [matTooltip]=\"value\" class=\"link\" target=\"_blank\">\n  <span class=\"flex flex-row items-center gap-2\">\n    <span *ngIf=\"short\" class=\"content grow-0\" i18n>Open</span>\n    <ng-container [ngSwitch]=\"protocol\">\n      <mat-icon *ngSwitchCase=\"'tel'\" class=\"grow-0\">call</mat-icon>\n      <mat-icon *ngSwitchCase=\"'mailto'\" class=\"grow-0\">email</mat-icon>\n      <mat-icon *ngSwitchDefault class=\"grow-0\">launch</mat-icon>\n    </ng-container>\n    <span *ngIf=\"!short\" class=\"content grow-0\">{{value}}</span>\n  </span>\n</a>\n<ng-content></ng-content>\n", styles: [".link{text-decoration:none;color:inherit}.link .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"] }]
        }], propDecorators: { value: [{
                type: Input,
                args: ['rxap-link-cell']
            }], protocol: [{
                type: Input
            }], short: [{
                type: Input
            }] } });
//# sourceMapp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