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