import { Validators } from '@angular/forms';
import { Component } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
import * as i2 from "../../core";
import * as i3 from "../access-control-config.service";
import * as i4 from "@angular/common";
import * as i5 from "@angular/flex-layout/flex";
import * as i6 from "@angular/material/button";
import * as i7 from "@angular/material/form-field";
import * as i8 from "@angular/material/input";
import * as i9 from "@angular/material/card";
import * as i10 from "@angular/material/button-toggle";
import * as i11 from "@angular/material/progress-bar";
const errorMessages = {
    max_failed_consecutive_login_attempts: {
        required: 'The max failed consecutive login attempts field is required.',
    },
    max_old_passwords_block: {
        required: 'The max old passwords block field is required.',
    },
};
export class AccessControlConfigFormComponent {
    constructor(fb, formValidatorService, alertService, accessControlConfigService, location) {
        this.fb = fb;
        this.formValidatorService = formValidatorService;
        this.alertService = alertService;
        this.accessControlConfigService = accessControlConfigService;
        this.location = location;
        this.createForm();
    }
    /**
     * Create the form instance.
     *
     * @private
     */
    createForm() {
        this.configForm = this.fb.group({
            id: [''],
            client_id: [''],
            max_failed_consecutive_login_attempts: [5, Validators.required],
            is_track_old_passwords: [false],
            max_old_passwords_block: [2, Validators.required],
            is_password_require_number: [false],
            is_password_require_symbol: [false],
            is_password_require_capital_letter: [false],
            min_password_length: [5],
        });
    }
    ngOnInit() {
        // fetch the access control config for client
        this.fetchAccessControlConfig();
    }
    /**
     * Save the access control configuration.
     */
    submit() {
        if (this.configForm.invalid) {
            this.alertService.addAlert('Please check the form for errors.', 'error');
            return;
        }
        const data = { ...this.configForm.value };
        let subscription = this.accessControlConfigService.store(data);
        if (data?.client_id) {
            subscription = this.accessControlConfigService.update(data);
        }
        this.isSaving = true;
        subscription.subscribe({
            next: (response) => {
                this.isSaving = false;
                // update the form with response.
                this.configForm.patchValue({
                    ...response?.item
                });
                this.alertService.addAlert('Configuration saved successfully', 'success');
            },
            error: () => this.isSaving = false
        });
    }
    resetFieldValue(field) {
        this.configForm.get(field).setValue('');
    }
    getFieldValue(field) {
        return this.configForm.get(field).value;
    }
    isFieldValid(field) {
        return this.formValidatorService.isFieldValid(field, this.configForm);
    }
    getErrorMessage(field) {
        return this.formValidatorService.getErrorMessage(field, this.configForm, errorMessages);
    }
    /**
     * Fetch access control config and update the form.
     *
     * @private
     */
    fetchAccessControlConfig() {
        this.isWorking = true;
        this.accessControlConfigService.index().subscribe({
            next: (response) => {
                this.isWorking = false;
                const data = response?.data;
                // set the defaults
                if (!data?.client_id) {
                    data.max_failed_consecutive_login_attempts = 5;
                    data.max_old_passwords_block = 2;
                    data.min_password_length = 5;
                }
                this.configForm.patchValue(data);
            },
            error: () => this.isWorking = false
        });
    }
    /**
     * Redirect back to last page.
     */
    redirectBack() {
        this.location.back();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AccessControlConfigFormComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2.FormValidatorService }, { token: i2.AlertService }, { token: i3.AccessControlConfigService }, { token: i4.Location }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AccessControlConfigFormComponent, selector: "app-access-control-config-form", ngImport: i0, template: "<mat-card fxLayout=\"row\" fxLayoutAlign=\"center\" fxFlexOffset=\"25%\" fxFlex=\"50%\">\n  <mat-card-content>\n    <form [formGroup]=\"configForm\" (ngSubmit)=\"submit()\">\n      <div fxLayout=\"column\" class=\"mat-typography\">\n        <div class=\"text-center\">\n          <h2>\n            Access Control Configuration\n          </h2>\n        </div>\n        <div class=\"alert alert-warning\" role=\"alert\">\n          Be careful with these configurations as they affect all users in your entire app.\n        </div>\n        <div *ngIf=\"!isWorking\" fxLayout=\"row wrap\" fxLayoutGap=\"1rem grid\">\n          <mat-form-field fxFlex=\"100%\">\n            <mat-label>\n              Max Failed Login Attempts\n            </mat-label>\n            <input matInput formControlName=\"max_failed_consecutive_login_attempts\"\n              placeholder=\"Max Failed Login Attempts\" autocomplete=\"off\" type=\"number\" min=\"0\" required />\n            <mat-hint>After how many failed login attempts should this user\u2019s account be locked?</mat-hint>\n            <mat-error *ngIf=\"isFieldValid('max_failed_consecutive_login_attempts')\">\n              {{getErrorMessage('max_failed_consecutive_login_attempts')}}\n            </mat-error>\n          </mat-form-field>\n\n          <mat-form-field fxFlex=\"100%\">\n            <mat-label>\n              Block x most recent passwords\n            </mat-label>\n            <input matInput formControlName=\"max_old_passwords_block\" placeholder=\"Block x most recent passwords\"\n              type=\"number\" min=\"0\" autocomplete=\"off\" required />\n            <mat-hint>\n              How many recent passwords should the system block the user from reusing?\n              Example: The user cannot reuse any of his/her last 3 passwords.\n            </mat-hint>\n            <mat-error *ngIf=\"isFieldValid('max_old_passwords_block')\">\n              {{getErrorMessage('max_old_passwords_block')}}\n            </mat-error>\n          </mat-form-field>\n\n          <mat-form-field fxFlex=\"100%\">\n            <mat-label>\n              Minimum Password Length\n            </mat-label>\n            <input matInput formControlName=\"min_password_length\" placeholder=\"Minimum Password Length\" type=\"number\"\n              min=\"1\" autocomplete=\"off\" />\n            <mat-hint>\n              What is the minimum length of a user\u2019s password?\n            </mat-hint>\n            <mat-error *ngIf=\"isFieldValid('min_password_length')\">\n              {{getErrorMessage('min_password_length')}}\n            </mat-error>\n          </mat-form-field>\n\n          <div fxFlex=\"0 1 calc(50%-1rem)\">\n            <div fxLayout=\"column\">\n              <p class=\"text-secondary mb-0\"> Track Old Passwords?</p>\n              <div>\n                <mat-button-toggle-group [hideSingleSelectionIndicator]=\"true\" [hideMultipleSelectionIndicator]=\"true\"\n                  formControlName=\"is_track_old_passwords\" class=\"status\" name=\"status\">\n                  <mat-button-toggle [value]=\"true\">\n                    Yes\n                  </mat-button-toggle>\n                  <mat-button-toggle [value]=\"false\">\n                    No\n                  </mat-button-toggle>\n                </mat-button-toggle-group>\n                <br>\n                <mat-hint class=\"custom-hint\">\n                  Should our software track old passwords to ensure users do not reuse old passwords?\n                </mat-hint>\n              </div>\n            </div>\n          </div>\n          <div fxFlex=\"0 1 calc(50%-1rem)\">\n            <div fxLayout=\"column\">\n              <p class=\"text-secondary mb-0\"> Password Require Number </p>\n              <div>\n                <mat-button-toggle-group [hideSingleSelectionIndicator]=\"true\" [hideMultipleSelectionIndicator]=\"true\"\n                  formControlName=\"is_password_require_number\" class=\"status\" name=\"status\">\n                  <mat-button-toggle [value]=\"true\">\n                    Yes\n                  </mat-button-toggle>\n                  <mat-button-toggle [value]=\"false\">\n                    No\n                  </mat-button-toggle>\n                </mat-button-toggle-group>\n                <br>\n                <mat-hint class=\"custom-hint\">\n                  Should the system force a user to have a number in his/her password?\n                </mat-hint>\n              </div>\n            </div>\n          </div>\n\n          <div fxFlex=\"0 1 calc(50%-1rem)\">\n            <div fxLayout=\"column\">\n              <p class=\"text-secondary mb-0\"> Password Require Symbol </p>\n              <div>\n                <mat-button-toggle-group [hideSingleSelectionIndicator]=\"true\" [hideMultipleSelectionIndicator]=\"true\"\n                  formControlName=\"is_password_require_symbol\" class=\"status\" name=\"status\">\n                  <mat-button-toggle [value]=\"true\">\n                    Yes\n                  </mat-button-toggle>\n                  <mat-button-toggle [value]=\"false\">\n                    No\n                  </mat-button-toggle>\n                </mat-button-toggle-group>\n                <br>\n                <mat-hint class=\"custom-hint\">\n                  Should the system force a user to have a symbol in his/her password?\n                </mat-hint>\n              </div>\n            </div>\n          </div>\n          <div fxFlex=\"0 1 calc(50%-1rem)\">\n            <div fxLayout=\"column\">\n              <p class=\"text-secondary mb-0\"> Password Require Capital Letter </p>\n              <div>\n                <mat-button-toggle-group [hideSingleSelectionIndicator]=\"true\" [hideMultipleSelectionIndicator]=\"true\"\n                  formControlName=\"is_password_require_capital_letter\" class=\"status\" name=\"status\">\n                  <mat-button-toggle [value]=\"true\">\n                    Yes\n                  </mat-button-toggle>\n                  <mat-button-toggle [value]=\"false\">\n                    No\n                  </mat-button-toggle>\n                </mat-button-toggle-group>\n                <br>\n                <mat-hint class=\"custom-hint\">\n                  Should the system force a user to have a capital letter in his/her password?\n                </mat-hint>\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class=\"mt-3 mb-3\">\n          <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n        </div>\n        <div fxFlex=\"100%\" fxLayout fxLayoutAlign=\"end\" fxLayoutGap=\"1rem\">\n          <button [disabled]=\"isSaving\" mat-flat-button type=\"button\" (click)=\"redirectBack()\">\n            Cancel\n          </button>\n          <button [disabled]=\"isSaving\" mat-raised-button type=\"submit\" color=\"primary\">\n            {{ isSaving ? 'Saving...' : 'Save' }}\n          </button>\n        </div>\n      </div>\n    </form>\n  </mat-card-content>\n</mat-card>", styles: [".custom-hint{font-size:10.5px}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i5.DefaultLayoutDirective, selector: "  [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md],  [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md],  [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm],  [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutGapDirective, selector: "  [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md],  [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md],  [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm],  [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutAlignDirective, selector: "  [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md],  [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md],  [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm],  [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i5.DefaultFlexOffsetDirective, selector: "  [fxFlexOffset], [fxFlexOffset.xs], [fxFlexOffset.sm], [fxFlexOffset.md],  [fxFlexOffset.lg], [fxFlexOffset.xl], [fxFlexOffset.lt-sm], [fxFlexOffset.lt-md],  [fxFlexOffset.lt-lg], [fxFlexOffset.lt-xl], [fxFlexOffset.gt-xs], [fxFlexOffset.gt-sm],  [fxFlexOffset.gt-md], [fxFlexOffset.gt-lg]", inputs: ["fxFlexOffset", "fxFlexOffset.xs", "fxFlexOffset.sm", "fxFlexOffset.md", "fxFlexOffset.lg", "fxFlexOffset.xl", "fxFlexOffset.lt-sm", "fxFlexOffset.lt-md", "fxFlexOffset.lt-lg", "fxFlexOffset.lt-xl", "fxFlexOffset.gt-xs", "fxFlexOffset.gt-sm", "fxFlexOffset.gt-md", "fxFlexOffset.gt-lg"] }, { kind: "directive", type: i5.DefaultFlexDirective, selector: "  [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md],  [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md],  [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm],  [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: i6.MatButton, selector: "    button[mat-button], button[mat-raised-button], button[mat-flat-button],    button[mat-stroked-button]  ", exportAs: ["matButton"] }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i7.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl],      input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i9.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i10.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i10.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: i11.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AccessControlConfigFormComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-access-control-config-form', template: "<mat-card fxLayout=\"row\" fxLayoutAlign=\"center\" fxFlexOffset=\"25%\" fxFlex=\"50%\">\n  <mat-card-content>\n    <form [formGroup]=\"configForm\" (ngSubmit)=\"submit()\">\n      <div fxLayout=\"column\" class=\"mat-typography\">\n        <div class=\"text-center\">\n          <h2>\n            Access Control Configuration\n          </h2>\n        </div>\n        <div class=\"alert alert-warning\" role=\"alert\">\n          Be careful with these configurations as they affect all users in your entire app.\n        </div>\n        <div *ngIf=\"!isWorking\" fxLayout=\"row wrap\" fxLayoutGap=\"1rem grid\">\n          <mat-form-field fxFlex=\"100%\">\n            <mat-label>\n              Max Failed Login Attempts\n            </mat-label>\n            <input matInput formControlName=\"max_failed_consecutive_login_attempts\"\n              placeholder=\"Max Failed Login Attempts\" autocomplete=\"off\" type=\"number\" min=\"0\" required />\n            <mat-hint>After how many failed login attempts should this user\u2019s account be locked?</mat-hint>\n            <mat-error *ngIf=\"isFieldValid('max_failed_consecutive_login_attempts')\">\n              {{getErrorMessage('max_failed_consecutive_login_attempts')}}\n            </mat-error>\n          </mat-form-field>\n\n          <mat-form-field fxFlex=\"100%\">\n            <mat-label>\n              Block x most recent passwords\n            </mat-label>\n            <input matInput formControlName=\"max_old_passwords_block\" placeholder=\"Block x most recent passwords\"\n              type=\"number\" min=\"0\" autocomplete=\"off\" required />\n            <mat-hint>\n              How many recent passwords should the system block the user from reusing?\n              Example: The user cannot reuse any of his/her last 3 passwords.\n            </mat-hint>\n            <mat-error *ngIf=\"isFieldValid('max_old_passwords_block')\">\n              {{getErrorMessage('max_old_passwords_block')}}\n            </mat-error>\n          </mat-form-field>\n\n          <mat-form-field fxFlex=\"100%\">\n            <mat-label>\n              Minimum Password Length\n            </mat-label>\n            <input matInput formControlName=\"min_password_length\" placeholder=\"Minimum Password Length\" type=\"number\"\n              min=\"1\" autocomplete=\"off\" />\n            <mat-hint>\n              What is the minimum length of a user\u2019s password?\n            </mat-hint>\n            <mat-error *ngIf=\"isFieldValid('min_password_length')\">\n              {{getErrorMessage('min_password_length')}}\n            </mat-error>\n          </mat-form-field>\n\n          <div fxFlex=\"0 1 calc(50%-1rem)\">\n            <div fxLayout=\"column\">\n              <p class=\"text-secondary mb-0\"> Track Old Passwords?</p>\n              <div>\n                <mat-button-toggle-group [hideSingleSelectionIndicator]=\"true\" [hideMultipleSelectionIndicator]=\"true\"\n                  formControlName=\"is_track_old_passwords\" class=\"status\" name=\"status\">\n                  <mat-button-toggle [value]=\"true\">\n                    Yes\n                  </mat-button-toggle>\n                  <mat-button-toggle [value]=\"false\">\n                    No\n                  </mat-button-toggle>\n                </mat-button-toggle-group>\n                <br>\n                <mat-hint class=\"custom-hint\">\n                  Should our software track old passwords to ensure users do not reuse old passwords?\n                </mat-hint>\n              </div>\n            </div>\n          </div>\n          <div fxFlex=\"0 1 calc(50%-1rem)\">\n            <div fxLayout=\"column\">\n              <p class=\"text-secondary mb-0\"> Password Require Number </p>\n              <div>\n                <mat-button-toggle-group [hideSingleSelectionIndicator]=\"true\" [hideMultipleSelectionIndicator]=\"true\"\n                  formControlName=\"is_password_require_number\" class=\"status\" name=\"status\">\n                  <mat-button-toggle [value]=\"true\">\n                    Yes\n                  </mat-button-toggle>\n                  <mat-button-toggle [value]=\"false\">\n                    No\n                  </mat-button-toggle>\n                </mat-button-toggle-group>\n                <br>\n                <mat-hint class=\"custom-hint\">\n                  Should the system force a user to have a number in his/her password?\n                </mat-hint>\n              </div>\n            </div>\n          </div>\n\n          <div fxFlex=\"0 1 calc(50%-1rem)\">\n            <div fxLayout=\"column\">\n              <p class=\"text-secondary mb-0\"> Password Require Symbol </p>\n              <div>\n                <mat-button-toggle-group [hideSingleSelectionIndicator]=\"true\" [hideMultipleSelectionIndicator]=\"true\"\n                  formControlName=\"is_password_require_symbol\" class=\"status\" name=\"status\">\n                  <mat-button-toggle [value]=\"true\">\n                    Yes\n                  </mat-button-toggle>\n                  <mat-button-toggle [value]=\"false\">\n                    No\n                  </mat-button-toggle>\n                </mat-button-toggle-group>\n                <br>\n                <mat-hint class=\"custom-hint\">\n                  Should the system force a user to have a symbol in his/her password?\n                </mat-hint>\n              </div>\n            </div>\n          </div>\n          <div fxFlex=\"0 1 calc(50%-1rem)\">\n            <div fxLayout=\"column\">\n              <p class=\"text-secondary mb-0\"> Password Require Capital Letter </p>\n              <div>\n                <mat-button-toggle-group [hideSingleSelectionIndicator]=\"true\" [hideMultipleSelectionIndicator]=\"true\"\n                  formControlName=\"is_password_require_capital_letter\" class=\"status\" name=\"status\">\n                  <mat-button-toggle [value]=\"true\">\n                    Yes\n                  </mat-button-toggle>\n                  <mat-button-toggle [value]=\"false\">\n                    No\n                  </mat-button-toggle>\n                </mat-button-toggle-group>\n                <br>\n                <mat-hint class=\"custom-hint\">\n                  Should the system force a user to have a capital letter in his/her password?\n                </mat-hint>\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class=\"mt-3 mb-3\">\n          <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n        </div>\n        <div fxFlex=\"100%\" fxLayout fxLayoutAlign=\"end\" fxLayoutGap=\"1rem\">\n          <button [disabled]=\"isSaving\" mat-flat-button type=\"button\" (click)=\"redirectBack()\">\n            Cancel\n          </button>\n          <button [disabled]=\"isSaving\" mat-raised-button type=\"submit\" color=\"primary\">\n            {{ isSaving ? 'Saving...' : 'Save' }}\n          </button>\n        </div>\n      </div>\n    </form>\n  </mat-card-content>\n</mat-card>", styles: [".custom-hint{font-size:10.5px}\n"] }]
        }], ctorParameters: () => [{ type: i1.UntypedFormBuilder }, { type: i2.FormValidatorService }, { type: i2.AlertService }, { type: i3.AccessControlConfigService }, { type: i4.Location }] });
//# sourceMappingURL=data:application/json;base64, 