"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[1799],{51799:(e,s,a)=>{a.r(s),a.d(s,{default:()=>u});var t=a(51609),l=a(45111),r=a(10790);const u=(0,t.memo)(({value:e,onChange:s,required:a,disabled:u,id:o,name:n,placeholder:i})=>{const p=o||n,[c,d]=(0,t.useState)(""),[m,g]=(0,t.useState)("password"),[h,f]=(0,t.useState)("eye");return(0,t.useEffect)(()=>{d(e||"")},[e]),(0,t.useEffect)(()=>{if(e===c)return;const a=setTimeout(()=>{s(c)},400);return()=>{clearTimeout(a)}},[c]),(0,r.jsxs)("div",{className:"cmplz-input-group cmplz-password-input-group",children:[(0,r.jsx)("input",{type:m,id:p,name:n,value:c,onChange:e=>(e=>{d(e)})(e.target.value),required:a,disabled:u,className:"cmplz-text-input-group__input",placeholder:i}),(0,r.jsx)("div",{onClick:e=>(e=>{console.log("togle",e),"password"===m?(g("text"),f("eye-slash")):(g("password"),f("eye"))})(e),children:(0,r.jsx)(l.default,{name:h,color:"grey",size:16})})]})})}}]);