import { Component, EventEmitter, Input, Output } from '@angular/core';
import { PasswordService } from './password.service';
import * as i0 from "@angular/core";
import * as i1 from "./password.service";
import * as i2 from "../i18n/c8y-translate.directive";
import * as i3 from "../i18n/c8y-translate.pipe";
/**
 * @deprecated: [MTM-56403] Password strength indicator removed from UI in favor of the enhanced password strength check list.
 */
export class PasswordStrengthComponent {
    set password(password) {
        if (typeof password === 'string') {
            this.model = this.passwordStrengthCheckerService.getStrengthColor(password);
            this.strength.emit(this.model);
        }
    }
    constructor(passwordStrengthCheckerService) {
        this.passwordStrengthCheckerService = passwordStrengthCheckerService;
        this.strength = new EventEmitter();
        this.password = '';
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: PasswordStrengthComponent, deps: [{ token: i1.PasswordService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: PasswordStrengthComponent, selector: "c8y-password-strength", inputs: { password: "password" }, outputs: { strength: "strength" }, ngImport: i0, template: "<div class=\"password-strength password-{{ model.colorName }}\">\r\n  <label class=\"password-strength-label small\" translate>\r\n    Password strength\r\n  </label>\r\n  <div>\r\n    <div class=\"password-bar\"></div>\r\n  </div>\r\n  <span class=\"small\">\r\n    {{ model.description | translate }}\r\n  </span>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "pipe", type: i3.C8yTranslatePipe, name: "translate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: PasswordStrengthComponent, decorators: [{
            type: Component,
            args: [{ selector: 'c8y-password-strength', template: "<div class=\"password-strength password-{{ model.colorName }}\">\r\n  <label class=\"password-strength-label small\" translate>\r\n    Password strength\r\n  </label>\r\n  <div>\r\n    <div class=\"password-bar\"></div>\r\n  </div>\r\n  <span class=\"small\">\r\n    {{ model.description | translate }}\r\n  </span>\r\n</div>\r\n" }]
        }], ctorParameters: () => [{ type: i1.PasswordService }], propDecorators: { password: [{
                type: Input,
                args: ['password']
            }], strength: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFzc3dvcmQtc3RyZW5ndGguY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vY29yZS9hdXRoZW50aWNhdGlvbi9wYXNzd29yZC1zdHJlbmd0aC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi9jb3JlL2F1dGhlbnRpY2F0aW9uL3Bhc3N3b3JkLXN0cmVuZ3RoLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDdkUsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLG9CQUFvQixDQUFDOzs7OztBQUVyRDs7R0FFRztBQUtILE1BQU0sT0FBTyx5QkFBeUI7SUFDcEMsSUFDSSxRQUFRLENBQUMsUUFBZ0I7UUFDM0IsSUFBSSxPQUFPLFFBQVEsS0FBSyxRQUFRLEVBQUUsQ0FBQztZQUNqQyxJQUFJLENBQUMsS0FBSyxHQUFHLElBQUksQ0FBQyw4QkFBOEIsQ0FBQyxnQkFBZ0IsQ0FBQyxRQUFRLENBQUMsQ0FBQztZQUM1RSxJQUFJLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUM7UUFDakMsQ0FBQztJQUNILENBQUM7SUFNRCxZQUFvQiw4QkFBK0M7UUFBL0MsbUNBQThCLEdBQTlCLDhCQUE4QixDQUFpQjtRQUpuRSxhQUFRLEdBQUcsSUFBSSxZQUFZLEVBQUUsQ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