var j=Object.defineProperty;var f=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable;var x=(e,t,s)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,b=(e,t)=>{for(var s in t||(t={}))S.call(t,s)&&x(e,s,t[s]);if(f)for(var s of f(t))D.call(t,s)&&x(e,s,t[s]);return e};import{j as o,_ as C}from"./main.2.8.1.js";import{u as I,h as N,d as r}from"./react-router-dom.9mCuUg3q.js";import"./Note.BeM7sN-p.js";import{S as _}from"./SnackMsg.S8DrwLlT.js";import{S as k}from"./Steps.1hz7v9Vj.js";import{I as w,s as y}from"./Integrations.D2bgBas2.js";import L from"./DropboxAuthorization.ieQAIwvI.js";import{D as F}from"./DropboxIntegLayout.CeesEBQJ.js";import"./CopyIcn.3gZpHton.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./DropboxCommonFunc.CVFsAsv5.js";import"./tutorialLinks.kMkIDzcD.js";import"./TutorialLink.BAFX--T3.js";function U({formFields:e,setFlow:t,flow:s,allIntegURL:u}){const g=I(),{flowID:n}=N(),[c,p]=r.useState(!1),[i,m]=r.useState(1),[h,d]=r.useState({show:!1}),[a,l]=r.useState({name:"Dropbox",type:"Dropbox",clientId:"",clientSecret:"",accessCode:"",field_map:[{formField:"",dropboxFormField:""}],foldersList:[],actions:{}}),v=()=>{y({flow:s,setFlow:t,allIntegURL:u,conf:a,navigate:g,setIsLoading:p,setSnackbar:d})};return o.jsxs("div",{children:[o.jsx(_,{snack:h,setSnackbar:d}),o.jsx("div",{className:"txt-center mt-2",children:o.jsx(k,{step:3,active:i})}),o.jsx(L,{flowID:n,dropboxConf:a,setDropboxConf:l,step:i,setStep:m,isLoading:c,setIsLoading:p}),o.jsxs("div",{className:"btcd-stp-page",style:b({},i===2&&{width:900,height:"auto",overflow:"visible"}),children:[o.jsx(F,{flowID:n,formFields:e,dropboxConf:a,setDropboxConf:l}),o.jsxs("button",{onClick:()=>m(3),disabled:a.field_map.length<1,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",children:[C("Next","bit-integrations")," ",o.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),o.jsx(w,{step:i,saveConfig:()=>v(),isLoading:c})]})}export{U as default};
