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