import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "../../services/util/util.service";
import * as i2 from "@angular/common";
import * as i3 from "primeng/inplace";
import * as i4 from "primeng/button";
import * as i5 from "primeng/api";
function MaskComponent_1_ng_template_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtext(0);
    i0.ɵɵelement(1, "button", 4);
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext(2);
    i0.ɵɵtextInterpolate1(" ", ctx_r2.util.mask(ctx_r2.value, ctx_r2.value.length / 2), " ");
} }
function MaskComponent_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, MaskComponent_1_ng_template_0_Template, 2, 1, "ng-template", 3);
} }
function MaskComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtext(0);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵtextInterpolate1(" ", ctx_r1.value, " ");
} }
export class MaskComponent {
    constructor(util) {
        this.util = util;
    }
    ngOnInit() {
    }
    static { this.ɵfac = function MaskComponent_Factory(t) { return new (t || MaskComponent)(i0.ɵɵdirectiveInject(i1.UtilService)); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MaskComponent, selectors: [["app-mask"]], inputs: { value: "value" }, decls: 3, vars: 1, consts: [["closable", "true", "closeIcon", "pi pi-eye-slash"], [4, "ngIf"], ["pTemplate", "content"], ["pTemplate", "display"], ["pButton", "", "type", "button", "icon", "pi pi-eye"]], template: function MaskComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "p-inplace", 0);
            i0.ɵɵtemplate(1, MaskComponent_1_Template, 1, 0, null, 1)(2, MaskComponent_ng_template_2_Template, 1, 1, "ng-template", 2);
            i0.ɵɵelementEnd();
        } if (rf & 2) {
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("ngIf", ctx.value);
        } }, dependencies: [i2.NgIf, i3.Inplace, i4.ButtonDirective, i5.PrimeTemplate], styles: ["button.ui-button[_ngcontent-%COMP%]{background-color:var(--ion-color-medium)!important;border:1px solid white!important;font-size:x-small}[_nghost-%COMP%]     p-inplace .p-button.p-button-icon-only{height:1.75rem!important;width:1.75rem!important}[_nghost-%COMP%]     p-inplace .p-button{background-color:var(--ion-color-medium)!important;border:1px solid white!important;font-size:x-small}[_nghost-%COMP%]     p-inplace .pi{font-size:1rem!important}"] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MaskComponent, [{
        type: Component,
        args: [{ selector: 'app-mask', template: "<p-inplace closable=\"true\" closeIcon=\"pi pi-eye-slash\">\r\n  <ng-template pTemplate=\"display\" *ngIf=\"value\">\r\n    {{util.mask(value, value.length/2)}}\r\n    <button pButton type=\"button\" icon=\"pi pi-eye\" ></button>\r\n  </ng-template>\r\n  <ng-template pTemplate=\"content\">\r\n    {{value}}\r\n  </ng-template>\r\n</p-inplace>", styles: ["button.ui-button{background-color:var(--ion-color-medium)!important;border:1px solid white!important;font-size:x-small}:host ::ng-deep p-inplace .p-button.p-button-icon-only{height:1.75rem!important;width:1.75rem!important}:host ::ng-deep p-inplace .p-button{background-color:var(--ion-color-medium)!important;border:1px solid white!important;font-size:x-small}:host ::ng-deep p-inplace .pi{font-size:1rem!important}\n"] }]
    }], () => [{ type: i1.UtilService }], { value: [{
            type: Input,
            args: ['value']
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MaskComponent, { className: "MaskComponent", filePath: "lib\\components\\mask\\mask.component.ts", lineNumber: 9 }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFzay5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtcmV1c2EtYXBwLWxpYi9zcmMvbGliL2NvbXBvbmVudHMvbWFzay9tYX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