var j=Object.defineProperty;var x=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable;var f=(o,t,s)=>t in o?j(o,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):o[t]=s,b=(o,t)=>{for(var s in t||(t={}))S.call(t,s)&&f(o,s,t[s]);if(x)for(var s of x(t))D.call(t,s)&&f(o,s,t[s]);return o};import{u as C,k,r as n,j as e}from"./main-406.js";import{d as I,_ as N,I as _,s as w}from"./bi.394.85.js";import{S as y}from"./bi.68.941.js";import L from"./bi.937.232.js";import{D as F}from"./bi.688.755.js";import"./bi.464.754.js";import"./bi.150.760.js";function B({formFields:o,setFlow:t,flow:s,allIntegURL:u}){const g=C(),{flowID:r}=k(),[c,p]=n.useState(!1),[a,d]=n.useState(1),[h,l]=n.useState({show:!1}),[i,m]=n.useState({name:"Dropbox",type:"Dropbox",clientId:"",clientSecret:"",accessCode:"",field_map:[{formField:"",dropboxFormField:""}],foldersList:[],actions:{}}),v=()=>{w({flow:s,setFlow:t,allIntegURL:u,conf:i,navigate:g,setIsLoading:p,setSnackbar:l})};return e.jsxs("div",{children:[e.jsx(I,{snack:h,setSnackbar:l}),e.jsx("div",{className:"txt-center mt-2",children:e.jsx(y,{step:3,active:a})}),e.jsx(L,{flowID:r,dropboxConf:i,setDropboxConf:m,step:a,setStep:d,isLoading:c,setIsLoading:p}),e.jsxs("div",{className:"btcd-stp-page",style:b({},a===2&&{width:900,height:"auto",overflow:"visible"}),children:[e.jsx(F,{flowID:r,formFields:o,dropboxConf:i,setDropboxConf:m}),e.jsxs("button",{onClick:()=>d(3),disabled:i.field_map.length<1,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",children:[N("Next","bit-integrations")," ",e.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),e.jsx(_,{step:a,saveConfig:()=>v(),isLoading:c})]})}export{B as default};
