"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[112],{50112:(e,a,t)=>{t.r(a),t.d(a,{default:()=>i});var l=t(51280),u=t(88496);const i=(0,u.memo)((({value:e,onChange:a,onError:t,required:i,disabled:n,id:r,name:m})=>{const c=r||m,[p,s]=(0,u.useState)(e);return(0,u.useEffect)((()=>{e||(e=""),s(e)}),[]),(0,u.useEffect)((()=>{if(e===p)return;const l=setTimeout((()=>{var e;a(p),e=p,null===(e+="").match(/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/)&&t("invalid_email")}),500);return()=>{clearTimeout(l)}}),[p]),(0,l.createElement)("div",{className:"cmplz-input-group cmplz-email-input-group"},(0,l.createElement)("input",{type:"email",id:c,name:m,value:p,onChange:e=>(e=>{s(e)})(e.target.value),required:i,disabled:n,className:"cmplz-email-input-group__input"}))}))}}]);