import { Component, EventEmitter, HostBinding, Input, Output } from '@angular/core';
import { EclBaseEvent } from '../../model/ecl-base.event';
import { ECLBaseDirective } from '../ecl-base.directive';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "../ecl-icon/ecl-icon.component";
import * as i3 from "../ecl-link/ecl-link.directive";
export class EclSocialMediaFollowItemClickEvent extends EclBaseEvent {
}
export class EclSocialMediaFollowItemComponent extends ECLBaseDirective {
    constructor() {
        super(...arguments);
        this.href = '';
        this.size = 'xl';
        this.itemClick = new EventEmitter();
    }
    get cssClasses() {
        return [
            super.getCssClasses('ecl-social-media-follow__item'),
        ].join(' ').trim();
    }
    onItemClick(evt) {
        this.itemClick.next(new EclSocialMediaFollowItemClickEvent());
        if (!this.href) {
            evt.preventDefault();
        }
    }
}
/** @nocollapse */ EclSocialMediaFollowItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: EclSocialMediaFollowItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
/** @nocollapse */ EclSocialMediaFollowItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.6", type: EclSocialMediaFollowItemComponent, selector: "ecl-social-media-follow-item", inputs: { icon: "icon", href: "href", target: "target", size: "size" }, outputs: { itemClick: "itemClick" }, host: { properties: { "class": "this.cssClasses" } }, usesInheritance: true, ngImport: i0, template: "<a eclLink \n    (click)=\"onItemClick($event)\"\n    variant=\"standalone\"\n    [href]=\"href\" \n    [attr.target]=\"target\"\n    class=\"ecl-social-media-follow__link\">\n  <ecl-icon *ngIf=\"icon\" iconSet=\"social\" icon=\"{{ icon }}\" [size]=\"size\" class=\"ecl-social-media-follow__icon\"></ecl-icon>\n  <ecl-icon *ngIf=\"icon\" iconSet=\"social\" icon=\"{{ icon }}_hover\" [size]=\"size\" class=\"ecl-social-media-follow__icon-hover\"></ecl-icon>\n\n  <span class=\"ecl-link__label\">\n    <ng-content></ng-content>\n  </span>\n</a>\n", styles: [":host{display:list-item}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "ariaHidden", "focusable"] }, { kind: "directive", type: i3.EclLinkDirective, selector: "[eclLink]", inputs: ["variant", "isNegative", "isNoVisited"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: EclSocialMediaFollowItemComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ecl-social-media-follow-item', template: "<a eclLink \n    (click)=\"onItemClick($event)\"\n    variant=\"standalone\"\n    [href]=\"href\" \n    [attr.target]=\"target\"\n    class=\"ecl-social-media-follow__link\">\n  <ecl-icon *ngIf=\"icon\" iconSet=\"social\" icon=\"{{ icon }}\" [size]=\"size\" class=\"ecl-social-media-follow__icon\"></ecl-icon>\n  <ecl-icon *ngIf=\"icon\" iconSet=\"social\" icon=\"{{ icon }}_hover\" [size]=\"size\" class=\"ecl-social-media-follow__icon-hover\"></ecl-icon>\n\n  <span class=\"ecl-link__label\">\n    <ng-content></ng-content>\n  </span>\n</a>\n", styles: [":host{display:list-item}\n"] }]
        }], propDecorators: { icon: [{
                type: Input
            }], href: [{
                type: Input
            }], target: [{
                type: Input
            }], size: [{
                type: Input
            }], cssClasses: [{
                type: HostBinding,
                args: ['class']
            }], itemClick: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWNsLXNvY2lhbC1tZWRpYS1mb2xsb3ctaXRlbS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvbXBvbmVudHMvZWNsLXNvY2lhbC1tZWRpYS1mb2xsb3cvZWNsLXNvY2lhbC1tZW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