"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[8458],{18458:(e,a,t)=>{t.r(a),t.d(a,{default:()=>i});var l=t(51609),u=t(86087);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.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/)&&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"}))}))}}]);