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.10.js";import{u as I,e as N,b as r}from"./react-router.DMwpH23k.js";import"./CopyIcn.BnhKHfEP.js";import{S as _}from"./SnackMsg.7BjcJK1j.js";import{S as k}from"./Steps.B84Ui3GU.js";import{I as w,s as y}from"./Integrations.BFhED4ck.js";import L from"./DropboxAuthorization.CMjS33uz.js";import{D as F}from"./DropboxIntegLayout.Bgi6Mury.js";import"./react-vendor.P7K3d6op.js";import"./Note.DalStCGz.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";import"./DropboxCommonFunc.Cgn_D7pU.js";import"./TutorialLink.D6K_DiHL.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,l]=r.useState({show:!1}),[a,d]=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:l})};return o.jsxs("div",{children:[o.jsx(_,{snack:h,setSnackbar:l}),o.jsx("div",{className:"txt-center mt-2",children:o.jsx(k,{step:3,active:i})}),o.jsx(L,{flowID:n,dropboxConf:a,setDropboxConf:d,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:d}),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};
