"use strict";(globalThis.webpackChunkhelpgent=globalThis.webpackChunkhelpgent||[]).push([[102],{7102:(e,t,l)=>{l.r(t),l.d(t,{default:()=>i});var n=l(51609),a=l(86087),r=l(4286),s=l(38745),d=l(29898);function i(e){var t;const{selectedElement:l,featureState:i,setFeatureState:o,isClientModeActive:m,register:p,errors:c,clearErrors:u,setValue:g,getValues:_,resetField:h,control:f,watch:E,setError:y,isElementEdited:w,updateEditedElementStatus:F,deleteAnswers:v,deleteAttachment:b,getCachedFormData:C,updateCachedFormData:D,submissionLoader:A,tempData:T,updateTempData:S}=e,k=i.singleForm.content?.elements,{global:L}=i.singleForm.content,{deviceType:V}=i,{general:$,socials:x,externalButton:M,elementLogic:B}=l.controls,G=(0,d.UR)()[l.element_type];return window.innerWidth,(0,s.L)(),(0,a.useEffect)(()=>{if("welcome"===i?.activeElement?.element_type){let e=0;k.map(t=>"open_ended"===t.element_type?e+=3:"long_text"===t.element_type||"contact_info"===t.element_type||"address"===t.element_type?e+=2:"dropdown"===t.element_type||"multi_select"===t.element_type||"single_select"===t.element_type||"picture_select"===t.element_type?e+=.5*t?.controls?.general?.options?.length:"welcome"!==t.element_type&&"user_validation"!==t.element_type&&"end"!==t.element_type?e+=1:void 0);const t=60*e/8;o({...i,estimatedTime:10*Math.round(t/10)})}},[i?.activeElement]),(0,n.createElement)(r.Gb,{className:`${m?"helpgent-client":""} helpgent-element-element-wrapper helpgent-element-element-wrapper--${l.element_type} helpgent-scrollbar-style helpgent-element-element-wrapper--${l.element_type}-${null!==(t=i?.openEndedAnswerType)&&void 0!==t?t:""}`},(0,n.createElement)(G,{featureState:i,setFeatureState:o,tempData:T,updateTempData:S,activeElement:l,elementId:l.id,fields:l.fields&&l.fields,defaultFields:l.default_field&&l.default_field,registeredFields:l.registered_field&&l.registered_field,GuestFields:l.guest_field&&l.guest_field,controls:l.controls,generalControls:$,isClientModeActive:m,socialLinks:x,externalButton:M,register:p,errors:c,clearErrors:u,setValue:g,getValues:_,resetField:h,control:f,watch:E,setError:y,isElementEdited:w,updateEditedElementStatus:F,deleteAnswers:v,deleteAttachment:b,getCachedFormData:C,updateCachedFormData:D,submissionLoader:A}))}}}]);