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