import { TooltipComponent } from '@alauda/ui';
import { ChangeDetectionStrategy, Component, ViewEncapsulation, } from '@angular/core';
import * as i0 from "@angular/core";
const _c0 = function (a0) { return { state: a0 }; };
const _c1 = function (a0) { return { chars: a0 }; };
function StrongPasswordTooltipComponent_ng_container_2_li_20_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "li");
    i0.ɵɵelementContainer(1, 5);
    i0.ɵɵelementStart(2, "span");
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const context_r3 = i0.ɵɵnextContext().ngIf;
    i0.ɵɵnextContext();
    const _r1 = i0.ɵɵreference(5);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction1(6, _c0, context_r3.state.specialChar));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(4, 3, "strong_password_conditions_special_char", i0.ɵɵpureFunction1(8, _c1, context_r3.conditions.specialChar)));
} }
const _c2 = function (a0, a1) { return { min: a0, max: a1 }; };
function StrongPasswordTooltipComponent_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "div", 3);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "ul", 4)(5, "li");
    i0.ɵɵelementContainer(6, 5);
    i0.ɵɵelementStart(7, "span");
    i0.ɵɵtext(8);
    i0.ɵɵpipe(9, "translate");
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(10, "li");
    i0.ɵɵelementContainer(11, 5);
    i0.ɵɵelementStart(12, "span");
    i0.ɵɵtext(13);
    i0.ɵɵpipe(14, "translate");
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(15, "li");
    i0.ɵɵelementContainer(16, 5);
    i0.ɵɵelementStart(17, "span");
    i0.ɵɵtext(18);
    i0.ɵɵpipe(19, "translate");
    i0.ɵɵelementEnd()();
    i0.ɵɵtemplate(20, StrongPasswordTooltipComponent_ng_container_2_li_20_Template, 5, 10, "li", 1);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const context_r3 = ctx.ngIf;
    i0.ɵɵnextContext();
    const _r1 = i0.ɵɵreference(5);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 11, "strong_password_hint_title"));
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction1(20, _c0, context_r3.state.length));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(9, 13, "strong_password_conditions_length", i0.ɵɵpureFunction2(22, _c2, context_r3.conditions.minLength, context_r3.conditions.maxLength)));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction1(25, _c0, context_r3.state.englishChar));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(14, 16, "strong_password_conditions_english_char"));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction1(27, _c0, context_r3.state.number));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(19, 18, "strong_password_conditions_number"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", context_r3.conditions.specialChar);
} }
function StrongPasswordTooltipComponent_ng_template_4_aui_icon_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "aui-icon", 8);
} }
function StrongPasswordTooltipComponent_ng_template_4_em_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "em");
} }
function StrongPasswordTooltipComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 6);
    i0.ɵɵtemplate(1, StrongPasswordTooltipComponent_ng_template_4_aui_icon_1_Template, 1, 0, "aui-icon", 7);
    i0.ɵɵtemplate(2, StrongPasswordTooltipComponent_ng_template_4_em_2_Template, 1, 0, "em", 1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const state_r6 = ctx.state;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", state_r6);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", !state_r6);
} }
export class StrongPasswordTooltipComponent extends TooltipComponent {
}
StrongPasswordTooltipComponent.ɵfac = /*@__PURE__*/ function () { let ɵStrongPasswordTooltipComponent_BaseFactory; return function StrongPasswordTooltipComponent_Factory(t) { return (ɵStrongPasswordTooltipComponent_BaseFactory || (ɵStrongPasswordTooltipComponent_BaseFactory = i0.ɵɵgetInheritedFactory(StrongPasswordTooltipComponent)))(t || StrongPasswordTooltipComponent); }; }();
StrongPasswordTooltipComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: StrongPasswordTooltipComponent, selectors: [["ng-component"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 6, vars: 9, consts: [[3, "mouseenter", "mouseleave"], [4, "ngIf"], ["indicator", ""], [1, "title"], [1, "conditions"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "indicator"], ["icon", "basic:check_circle", 4, "ngIf"], ["icon", "basic:check_circle"]], template: function StrongPasswordTooltipComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵlistener("mouseenter", function StrongPasswordTooltipComponent_Template_div_mouseenter_0_listener() { return ctx.hover$.next(true); })("mouseleave", function StrongPasswordTooltipComponent_Template_div_mouseleave_0_listener() { return ctx.hover$.next(false); });
        i0.ɵɵpipe(1, "async");
        i0.ɵɵtemplate(2, StrongPasswordTooltipComponent_ng_container_2_Template, 21, 29, "ng-container", 1);
        i0.ɵɵpipe(3, "async");
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(4, StrongPasswordTooltipComponent_ng_template_4_Template, 3, 2, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
    } if (rf & 2) {
        i0.ɵɵclassMap(i0.ɵɵpipeBind1(1, 5, ctx.class$));
        i0.ɵɵclassProp("strong-password-tooltip", true);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(3, 7, ctx.context$));
    } }, styles: [".cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.strong-password-tooltip.aui-tooltip{position:relative;padding:var(--aui-spacing-xl);line-height:var(--aui-line-height-s);font-size:var(--aui-font-size-s);border-radius:var(--aui-border-radius-m);word-wrap:break-word}:root .strong-password-tooltip.aui-tooltip{box-shadow:0 2px 8px 0 rgba(var(--aui-color-origin-shadow),.2)}html[aui-theme-mode=light] .strong-password-tooltip.aui-tooltip{box-shadow:0 2px 8px 0 rgba(var(--aui-color-origin-shadow),.2)}@media (prefers-color-scheme: dark){html[aui-theme-mode=system] .strong-password-tooltip.aui-tooltip{box-shadow:0 2px 8px 0 rgba(var(--aui-color-origin-shadow),.75)}}html[aui-theme-mode=dark] .strong-password-tooltip.aui-tooltip{box-shadow:0 2px 8px 0 rgba(var(--aui-color-origin-shadow),.75)}.strong-password-tooltip.aui-tooltip--info{color:rgb(var(--aui-color-n-1));background-color:rgb(var(--aui-color-popper-bg))}.strong-password-tooltip.aui-tooltip--top,.strong-password-tooltip.aui-tooltip--bottom{margin:var(--aui-spacing-s) 0}.strong-password-tooltip.aui-tooltip--start,.strong-password-tooltip.aui-tooltip--end{margin:0 var(--aui-spacing-s)}.strong-password-tooltip.aui-tooltip .title{margin-bottom:12px}.strong-password-tooltip.aui-tooltip .conditions li{display:flex;align-items:center}.strong-password-tooltip.aui-tooltip .conditions li+li{margin-top:8px}.strong-password-tooltip.aui-tooltip .indicator{display:inline-block;margin-right:8px;width:16px;height:16px;font-size:16px;color:rgb(var(--aui-color-green))}.strong-password-tooltip.aui-tooltip .indicator em{display:inline-block;width:100%;height:100%;border-radius:50%;border:solid 1px rgb(var(--aui-color-n-7))}\n"], encapsulation: 2, changeDetection: 0 });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(StrongPasswordTooltipComponent, [{
        type: Component,
        args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n  [class]=\"class$ | async\"\n  [class.strong-password-tooltip]=\"true\"\n  (mouseenter)=\"hover$.next(true)\"\n  (mouseleave)=\"hover$.next(false)\"\n>\n  <ng-container *ngIf=\"context$ | async as context\">\n    <div class=\"title\">{{ 'strong_password_hint_title' | translate }}</div>\n    <ul class=\"conditions\">\n      <li>\n        <ng-container\n          [ngTemplateOutlet]=\"indicator\"\n          [ngTemplateOutletContext]=\"{ state: context.state.length }\"\n        >\n        </ng-container>\n        <span>{{\n          'strong_password_conditions_length'\n            | translate\n              : {\n                  min: context.conditions.minLength,\n                  max: context.conditions.maxLength\n                }\n        }}</span>\n      </li>\n      <li>\n        <ng-container\n          [ngTemplateOutlet]=\"indicator\"\n          [ngTemplateOutletContext]=\"{ state: context.state.englishChar }\"\n        >\n        </ng-container>\n        <span>{{ 'strong_password_conditions_english_char' | translate }}</span>\n      </li>\n      <li>\n        <ng-container\n          [ngTemplateOutlet]=\"indicator\"\n          [ngTemplateOutletContext]=\"{ state: context.state.number }\"\n        >\n        </ng-container>\n        <span>{{ 'strong_password_conditions_number' | translate }}</span>\n      </li>\n      <li *ngIf=\"context.conditions.specialChar\">\n        <ng-container\n          [ngTemplateOutlet]=\"indicator\"\n          [ngTemplateOutletContext]=\"{ state: context.state.specialChar }\"\n        >\n        </ng-container>\n        <span>{{\n          'strong_password_conditions_special_char'\n            | translate: { chars: context.conditions.specialChar }\n        }}</span>\n      </li>\n    </ul>\n  </ng-container>\n</div>\n\n<ng-template\n  #indicator\n  let-state=\"state\"\n>\n  <span class=\"indicator\">\n    <aui-icon\n      *ngIf=\"state\"\n      icon=\"basic:check_circle\"\n    ></aui-icon>\n    <em *ngIf=\"!state\"></em>\n  </span>\n</ng-template>\n", styles: [".cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.strong-password-tooltip.aui-tooltip{position:relative;padding:var(--aui-spacing-xl);line-height:var(--aui-line-height-s);font-size:var(--aui-font-size-s);border-radius:var(--aui-border-radius-m);word-wrap:break-word}:root .strong-password-tooltip.aui-tooltip{box-shadow:0 2px 8px 0 rgba(var(--aui-color-origin-shadow),.2)}html[aui-theme-mode=light] .strong-password-tooltip.aui-tooltip{box-shadow:0 2px 8px 0 rgba(var(--aui-color-origin-shadow),.2)}@media (prefers-color-scheme: dark){html[aui-theme-mode=system] .strong-password-tooltip.aui-tooltip{box-shadow:0 2px 8px 0 rgba(var(--aui-color-origin-shadow),.75)}}html[aui-theme-mode=dark] .strong-password-tooltip.aui-tooltip{box-shadow:0 2px 8px 0 rgba(var(--aui-color-origin-shadow),.75)}.strong-password-tooltip.aui-tooltip--info{color:rgb(var(--aui-color-n-1));background-color:rgb(var(--aui-color-popper-bg))}.strong-password-tooltip.aui-tooltip--top,.strong-password-tooltip.aui-tooltip--bottom{margin:var(--aui-spacing-s) 0}.strong-password-tooltip.aui-tooltip--start,.strong-password-tooltip.aui-tooltip--end{margin:0 var(--aui-spacing-s)}.strong-password-tooltip.aui-tooltip .title{margin-bottom:12px}.strong-password-tooltip.aui-tooltip .conditions li{display:flex;align-items:center}.strong-password-tooltip.aui-tooltip .conditions li+li{margin-top:8px}.strong-password-tooltip.aui-tooltip .indicator{display:inline-block;margin-right:8px;width:16px;height:16px;font-size:16px;color:rgb(var(--aui-color-green))}.strong-password-tooltip.aui-tooltip .indicator em{display:inline-block;width:100%;height:100%;border-radius:50%;border:solid 1px rgb(var(--aui-color-n-7))}\n"] }]
    }], null, null); })();
//# sourceMappingURL=data:application/json;base64, 