import { ChangeDetectionStrategy, Component, HostBinding, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
export class EvoLinkButtonComponent {
    constructor() {
        this.loadingLabel = 'Подождите';
    }
    get isDisabled() {
        return this.disabled || this.loading || null;
    }
    getContainerClasses(containerClass) {
        const result = [];
        if (this.disabled) {
            result.push(`${containerClass}_disabled`);
        }
        if (this.loading) {
            result.push(`${containerClass}_loading`);
        }
        return result;
    }
}
EvoLinkButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: EvoLinkButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
EvoLinkButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: EvoLinkButtonComponent, selector: "button[evo-link-button], a[evo-link-button]", inputs: { disabled: "disabled", loading: "loading", loadingLabel: "loadingLabel" }, host: { properties: { "attr.disabled": "this.isDisabled" } }, ngImport: i0, template: "<div class=\"evo-link-button\" [class]=\"getContainerClasses('evo-link-button')\">\n    <ng-container *ngIf=\"!loading; else loadingLabelTemplate\">\n        <ng-content></ng-content>\n    </ng-container>\n</div>\n\n<ng-template #loadingLabelTemplate>{{loadingLabel}}</ng-template>\n", styles: ["@keyframes evo-fx-blink{50%{transform:scale(1);opacity:1}to{opacity:0}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes gradient{0%{background-position:0 50%}50%{background-position:50vw 50%}to{background-position:100vw 50%}}@keyframes evo-ellipsis-animation{0%{content:\"\"}25%{content:\".\"}50%{content:\"..\"}75%{content:\"...\"}to{content:\"\"}}:host{--evo-link-button-color: #0986E2;--evo-link-button-color-hover: #3A9EE8;--evo-link-button-color-active: #0879CB;--evo-link-button-color-disabled: #B0B0B0;--evo-link-button-white-space: nowrap;display:inline-block;padding:0;background:none;border:none;font-family:var(--evo-font);font-style:normal;font-size:14px;line-height:22px;font-weight:600}.evo-link-button{--inner-color: var(--evo-link-button-color);margin:0;padding:0;background:none;border:none;outline:none;transition:color .3s;white-space:var(--evo-link-button-white-space);color:var(--inner-color)}.evo-link-button:not(.evo-link-button_disabled):hover,.evo-link-button:not(.evo-link-button_disabled):focus{--inner-color: var(--evo-link-button-color-hover)}.evo-link-button:not(.evo-link-button_disabled):active{--inner-color: var(--evo-link-button-color-active)}.evo-link-button_disabled,.evo-link-button_loading{--inner-color: var(--evo-link-button-color-disabled)}.evo-link-button_loading:after{display:inline-block;animation:evo-ellipsis-animation steps(1,end) 1.6s infinite;content:\"\";width:1em;text-align:left}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: EvoLinkButtonComponent, decorators: [{
            type: Component,
            args: [{ selector: 'button[evo-link-button], a[evo-link-button]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"evo-link-button\" [class]=\"getContainerClasses('evo-link-button')\">\n    <ng-container *ngIf=\"!loading; else loadingLabelTemplate\">\n        <ng-content></ng-content>\n    </ng-container>\n</div>\n\n<ng-template #loadingLabelTemplate>{{loadingLabel}}</ng-template>\n", styles: ["@keyframes evo-fx-blink{50%{transform:scale(1);opacity:1}to{opacity:0}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes gradient{0%{background-position:0 50%}50%{background-position:50vw 50%}to{background-position:100vw 50%}}@keyframes evo-ellipsis-animation{0%{content:\"\"}25%{content:\".\"}50%{content:\"..\"}75%{content:\"...\"}to{content:\"\"}}:host{--evo-link-button-color: #0986E2;--evo-link-button-color-hover: #3A9EE8;--evo-link-button-color-active: #0879CB;--evo-link-button-color-disabled: #B0B0B0;--evo-link-button-white-space: nowrap;display:inline-block;padding:0;background:none;border:none;font-family:var(--evo-font);font-style:normal;font-size:14px;line-height:22px;font-weight:600}.evo-link-button{--inner-color: var(--evo-link-button-color);margin:0;padding:0;background:none;border:none;outline:none;transition:color .3s;white-space:var(--evo-link-button-white-space);color:var(--inner-color)}.evo-link-button:not(.evo-link-button_disabled):hover,.evo-link-button:not(.evo-link-button_disabled):focus{--inner-color: var(--evo-link-button-color-hover)}.evo-link-button:not(.evo-link-button_disabled):active{--inner-color: var(--evo-link-button-color-active)}.evo-link-button_disabled,.evo-link-button_loading{--inner-color: var(--evo-link-button-color-disabled)}.evo-link-button_loading:after{display:inline-block;animation:evo-ellipsis-animation steps(1,end) 1.6s infinite;content:\"\";width:1em;text-align:left}\n"] }]
        }], propDecorators: { disabled: [{
                type: Input
            }], loading: [{
                type: Input
            }], loadingLabel: [{
                type: Input
            }], isDisabled: [{
                type: HostBinding,
                args: ['attr.disabled']
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZvLWxpbmstYnV0dG9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2V2by11aS1raXQvc3JjL2xpYi9jb21wb25lbnRzL2V2by1saW5rLWJ1dHRvbi9ldm8tbGluay1idXR0b24uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZXZvLXVpLWtpdC9zcmMvbGliL2NvbXBvbmVudHMvZXZvLWxpbmstYnV0dG9uL2V2by1saW5rLWJ1dHRvbi5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLFdBQVcsRUFBRSxLQUFLLEVBQUMsTUFBTSxlQUFlLENBQUM7OztBQVFyRixNQUFNLE9BQU8sc0JBQXNCO0lBTm5DO1FBU2EsaUJBQVksR0FBRyxXQUFXLENBQUM7S0FtQnZDO0lBakJHLElBQWtDLFV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