import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { baseUrl } from '../utils';
import * as i0 from "@angular/core";
import * as i1 from "@fortawesome/angular-fontawesome";
import * as i2 from "../bind-once.directive";
import * as i3 from "@angular/common";
export class SchemaVersionLinkComponent {
    constructor() {
        this.showExternalLink = true;
        this.linkClass = '';
    }
    get url() {
        return [
            baseUrl(),
            'schema',
            this.node.schemaVersion,
            this.node['@type']
        ].filter(Boolean).join('/');
    }
}
SchemaVersionLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SchemaVersionLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
SchemaVersionLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SchemaVersionLinkComponent, selector: "he-schema-version-link", inputs: { node: "node", showExternalLink: "showExternalLink", linkClass: "linkClass", text: "text" }, ngImport: i0, template: "<ng-container *bindOnce=\"url\">\n  <a [href]=\"url\" target=\"_blank\" [class]=\"linkClass\" (click)=\"$event.stopPropagation()\">\n    <ng-content></ng-content>\n    <fa-icon class=\"ml-2\" icon=\"external-link-alt\" size=\"sm\" *ngIf=\"showExternalLink\"></fa-icon>\n  </a>\n</ng-container>\n", styles: ["a{color:inherit}\n"], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }], directives: [{ type: i2.BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SchemaVersionLinkComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'he-schema-version-link',
                    templateUrl: './schema-version-link.component.html',
                    styleUrls: ['./schema-version-link.component.scss'],
                    changeDetection: ChangeDetectionStrategy.OnPush
                }]
        }], propDecorators: { node: [{
                type: Input
            }], showExternalLink: [{
                type: Input
            }], linkClass: [{
                type: Input
            }], text: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NoZW1hLXZlcnNpb24tbGluay5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29tbW9uL3NjaGVtYS12ZXJzaW9uLWxpbmsvc2NoZW1hLXZlcnNpb24tbGluay5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi9zcmMvY29tbW9uL3NjaGVtYS12ZXJzaW9uLWxpbmsvc2NoZW1hLXZlcnNpb24tbGluay5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUUxRSxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sVUFBVSxDQUFDOzs7OztBQVFuQyxNQUFNLE9BQU8sMEJBQTBCO0lBTnZDO1FBVVMscUJBQWdCLEdBQUcsSUFBSSxDQUFDO1FBRXhCLGNBQVMsR0FBRyxFQUFFLENBQUM7S0FZdkI7SUFSQyxJQUFXLEdBQUc7UUFDWixPQUFPO1lBQ0wsT0FBTyxFQUFFO1lBQ1QsUUFBUTtZQUNSLElBQUksQ0FBQyxJQUFJLENBQUMsYUFBYTtZQUN2QixJQUFJLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQztTQUNuQixDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUM7SUFDOUIsQ0FBQzs7d0hBakJVLDBCQUEwQjs0R0FBMUIsMEJB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