import { Component } from '@angular/core';
import { RouterModule } from '@angular/router';
import { CellRendererContext, CommonModule } from '@c8y/ngx-components';
import { DeviceGridModule } from '@c8y/ngx-components/device-grid';
import { TooltipModule } from 'ngx-bootstrap/tooltip';
import * as i0 from "@angular/core";
import * as i1 from "@c8y/ngx-components";
import * as i2 from "@angular/common";
import * as i3 from "@angular/router";
export class RepositoryItemNameCellRendererComponent {
    constructor(context) {
        this.context = context;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RepositoryItemNameCellRendererComponent, deps: [{ token: i1.CellRendererContext }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: RepositoryItemNameCellRendererComponent, isStandalone: true, selector: "c8y-repository-item-name-cell-renderer", ngImport: i0, template: `
    <a
      class="interact"
      [title]="context.item.name"
      *ngIf="context?.property?.callback; else router"
      (click)="context.property.callback(context.item)"
    >
      {{ context.item.name }}
    </a>
    <ng-template #router>
      <a class="interact" [title]="context.item.name" [routerLink]="[context.item.id]">
        {{ context.item.name }}
      </a>
    </ng-template>
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: DeviceGridModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RepositoryItemNameCellRendererComponent, decorators: [{
            type: Component,
            args: [{
                    template: `
    <a
      class="interact"
      [title]="context.item.name"
      *ngIf="context?.property?.callback; else router"
      (click)="context.property.callback(context.item)"
    >
      {{ context.item.name }}
    </a>
    <ng-template #router>
      <a class="interact" [title]="context.item.name" [routerLink]="[context.item.id]">
        {{ context.item.name }}
      </a>
    </ng-template>
  `,
                    selector: 'c8y-repository-item-name-cell-renderer',
                    standalone: true,
                    imports: [CommonModule, DeviceGridModule, TooltipModule, RouterModule]
                }]
        }], ctorParameters: () => [{ type: i1.CellRendererContext }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmFtZS5jZWxsLXJlbmRlcmVyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3JlcG9zaXRvcnkvc2hhcmVkL2NvbHVtbnMvbmFtZS5jZWxsLXJlbmRlcmVyLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzFDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsWUFBWSxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDeEUsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDbkUsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLHVCQUF1QixDQUFDOzs7OztBQXNCdEQsTUFBTSxPQUFPLHVDQUF1QztJQUNsRCxZQUFtQixPQUE0QjtRQUE1QixZQUFPLEdBQVAsT0FBTyxDQUFxQjtJQUFHLENBQUM7K0dBRHhDLHVDQUF1QzttR0FBdkMsdUNBQXVDLGtHQW5CeEM7Ozs7Ozs7Ozs7Ozs7O0dBY1QsMkRBR1MsWUFBWSxrSUFBRSxnQkFBZ0IsOEJBQUUsYUFBYSw4QkFBRSxZQUFZOzs0RkFFMUQsdUNBQXVD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