var q=Object.defineProperty;var p=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var f=(t,e,a)=>e in t?q(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,b=(t,e)=>{for(var a in e||(e={}))I.call(e,a)&&f(t,a,e[a]);if(p)for(var a of p(e))j.call(e,a)&&f(t,a,e[a]);return t};import{u as P,k as S,r as n,j as r}from"./main-406.js";import{d as N,_,I as A,s as F}from"./bi.394.85.js";import{S as M}from"./bi.68.941.js";import{P as w,h as z,c as B}from"./bi.596.880.js";import{B as E}from"./bi.46.744.js";import R from"./bi.353.311.js";import"./bi.968.816.js";import"./bi.704.707.js";import"./bi.701.708.js";import"./bi.150.760.js";function V({formFields:t,setFlow:e,flow:a,allIntegURL:y}){const g=P(),{formID:k}=S(),[c,d]=n.useState(!1),[o,m]=n.useState(1),[v,i]=n.useState({show:!1}),C=[{key:"first_name",label:"First Name",required:!0},{key:"email",label:"Email",required:!0},{key:"mobile",label:"Mobile",required:!1},{key:"org_name",label:"Organization Name",required:!1},{key:"person_id",label:"Person Id ",required:!1},{key:"org_id",label:"Organization Id",required:!1},{key:"budget",label:"Budget",required:!1},{key:"currency",label:"Currency",required:!1},{key:"note",label:"Note",required:!1},{key:"country",label:"Country",required:!1},{key:"region",label:"State / Province / Region",required:!1},{key:"address",label:"Address",required:!1},{key:"city",label:"City",required:!1},{key:"zip",label:"ZIP Code",required:!1},{key:"desc",label:"Description",required:!1},{key:"img",label:"Contact Image",required:!1}],x=[{key:"1",label:"Create lead"}],[s,l]=n.useState({name:"Propovoice CRM",type:"Propovoice CRM",mainAction:"",field_map:[{formField:"",propovoiceCrmFormField:""}],leadFields:C,allActions:x,actions:{}}),h=u=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),m(3)};return r.jsxs("div",{children:[r.jsx(N,{snack:v,setSnackbar:i}),r.jsx("div",{className:"txt-center mt-2",children:r.jsx(M,{step:3,active:o})}),r.jsx(R,{formID:k,propovoiceCrmConf:s,setPropovoiceCrmConf:l,step:o,setStep:m,isLoading:c,setIsLoading:d,setSnackbar:i}),r.jsxs("div",{className:"btcd-stp-page",style:b({},o===2&&{width:900,height:"auto",overflow:"visible"}),children:[r.jsx(w,{formFields:t,handleInput:u=>z(u,s,l),propovoiceCrmConf:s,setPropovoiceCrmConf:l,isLoading:c,setIsLoading:d,setSnackbar:i}),r.jsxs("button",{onClick:()=>h(),disabled:!B(s),className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",children:[_("Next","bit-integrations"),r.jsx(E,{className:"ml-1 rev-icn"})]})]}),r.jsx(A,{step:o,saveConfig:()=>F({flow:a,setFlow:e,allIntegURL:y,conf:s,navigate:g,setIsLoading:d,setSnackbar:i}),isLoading:c,dataConf:s,setDataConf:l,formFields:t})]})}export{V as default};
