import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "../evo-icon/evo-icon.component";
import * as i2 from "../../directives/evo-ui-class.directive";
import * as i3 from "@angular/common";
export class EvoNoteComponent {
    constructor() {
        this.closable = false;
        this.type = 'success';
        this.close = new EventEmitter();
    }
    get totalClasses() {
        const classes = [];
        if (this.type) {
            classes.push('type-' + this.type);
        }
        if (this.closable) {
            classes.push('is-closable');
        }
        return classes;
    }
    onCloseClick(event) {
        this.close.emit(event);
    }
}
EvoNoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: EvoNoteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
EvoNoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: EvoNoteComponent, selector: "evo-note", inputs: { closable: "closable", iconSrc: "iconSrc", type: "type" }, outputs: { close: "close" }, ngImport: i0, template: "<div class=\"evo-note\" [evoUiClass]=\"totalClasses\">\n    <a *ngIf=\"closable\" class=\"evo-note__close\" (click)=\"$event.preventDefault(); onCloseClick($event)\">\n        <evo-icon class=\"evo-note__close-icon\" shape=\"close\"></evo-icon>\n    </a>\n    <div class=\"evo-note__icon\" *ngIf=\"iconSrc\">\n        <img [src]=\"iconSrc\" alt=\"\"/>\n    </div>\n    <div class=\"evo-note__content\">\n        <ng-content></ng-content>\n    </div>\n</div>\n", styles: [":host{--evo-note-icon-size: 48px}.evo-note{position:relative;display:flex;align-items:center;box-sizing:border-box;padding:16px;font-size:14px;line-height:22px;border-radius:8px;grid-gap:16px;gap:16px}.evo-note_is-closable{padding-right:32px}.evo-note_type-success{background-color:#e4f8f1}.evo-note_type-danger{background-color:#ffe8e8}.evo-note_type-info{background-color:#e6f9ff}.evo-note_type-warning{background-color:#fff8e6}.evo-note__icon{display:none;flex:0 0 var(--evo-note-icon-size);align-self:start;height:var(--evo-note-icon-size)}@media (min-width: 500px){.evo-note__icon{display:block}}.evo-note__close{position:absolute;top:4px;right:4px;display:flex;justify-content:center;align-items:center;width:24px;height:24px;color:#91b1b8}.evo-note__close:hover{color:#a7c1c6}.evo-note__close:active{color:#829fa6}.evo-note__close-icon{color:inherit;fill:currentColor}\n"], components: [{ type: i1.EvoIconComponent, selector: "evo-icon", inputs: ["shape", "svgWidth", "svgHeight", "svgViewBox"] }], directives: [{ type: i2.EvoUiClassDirective, selector: "[evoUiClass]", inputs: ["class", "evoUiClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: EvoNoteComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'evo-note',
                    templateUrl: './evo-note.component.html',
                    styleUrls: ['./evo-note.component.scss'],
                    changeDetection: ChangeDetectionStrategy.OnPush,
                }]
        }], propDecorators: { closable: [{
                type: Input
            }], iconSrc: [{
                type: Input
            }], type: [{
                type: Input
            }], close: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZvLW5vdGUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZXZvLXVpLWtpdC9zcmMvbGliL2NvbXBvbmVudHMvZXZvLW5vdGUvZXZvLW5vdGUuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZXZvLXVpLWtpdC9zcmMvbGliL2NvbXBvbmVudHMvZXZvLW5vdGUvZXZvLW5vdGUuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsS0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