import { Component, ViewEncapsulation, Input, ContentChild, HostBinding, HostListener, ElementRef } from '@angular/core';
import { NzAnchorComponent } from './nz-anchor.component';
var NzAnchorLinkComponent = (function () {
    function NzAnchorLinkComponent(el, _anchorComp) {
        this.el = el;
        this._anchorComp = _anchorComp;
        this._nzAnchorLink = true;
        this.active = false;
        this._anchorComp.add(this);
    }
    NzAnchorLinkComponent.prototype._onClick = function () {
        this._anchorComp.scrollTo(this);
    };
    NzAnchorLinkComponent.prototype.goToClick = function (e) {
        e.preventDefault();
        e.stopPropagation();
        this._anchorComp.scrollTo(this);
        // return false;
    };
    return NzAnchorLinkComponent;
}());
export { NzAnchorLinkComponent };
NzAnchorLinkComponent.decorators = [
    { type: Component, args: [{
                selector: 'nz-link',
                encapsulation: ViewEncapsulation.None,
                template: "\n    <a (click)=\"goToClick($event)\" href=\"{{nzHref}}\" class=\"ant-anchor-link-title\">\n      <span *ngIf=\"!nzTemplate\">{{nzTitle}}</span>\n      <ng-template *ngIf=\"nzTemplate\" [ngTemplateOutlet]=\"nzTemplate\"></ng-template>\n    </a>\n    <ng-content></ng-content>\n  "
            },] },
];
/** @nocollapse */
NzAnchorLinkComponent.ctorParameters = function () { return [
    { type: ElementRef, },
    { type: NzAnchorComponent, },
]; };
NzAnchorLinkComponent.propDecorators = {
    'nzHref': [{ type: Input },],
    'nzTitle': [{ type: Input },],
    'nzTemplate': [{ type: ContentChild, args: ['nzTemplate',] },],
    '_nzAnchorLink': [{ type: HostBinding, args: ['class.ant-anchor-link',] },],
    'active': [{ type: HostBinding, args: ['class.ant-anchor-link-active',] },],
    '_onClick': [{ type: HostListener, args: ['click',] },],
};
