var j=Object.defineProperty;var f=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var x=(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)&&x(o,s,t[s]);if(f)for(var s of f(t))C.call(t,s)&&x(o,s,t[s]);return o};import{j as e,_ as D}from"./main.2.9.0.js";import{u as I,e as N,b as r}from"./react-router.DMwpH23k.js";import"./CopyIcn.CEA_lFLo.js";import{S as _}from"./SnackMsg.DYSD96P4.js";import{S as k}from"./Steps.BYe8zHkm.js";import{I as w,s as y}from"./Integrations.DL8wqGct.js";import L from"./DropboxAuthorization.yaR_Gpf8.js";import{D as A}from"./DropboxIntegLayout.BIpilPcU.js";import"./react-vendor.P7K3d6op.js";import"./Note.NSUdvR3c.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";import"./DropboxCommonFunc.CeAbCIWw.js";import"./TutorialLink.CFG7bS5c.js";function U({formFields:o,setFlow:t,flow:s,allIntegURL:u}){const g=I(),{flowID:c}=N(),[p,m]=r.useState(!1),[i,d]=r.useState(1),[h,l]=r.useState({show:!1}),[a,n]=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:m,setSnackbar:l})};return e.jsxs("div",{children:[e.jsx(_,{snack:h,setSnackbar:l}),e.jsx("div",{className:"txt-center mt-2",children:e.jsx(k,{step:3,active:i})}),e.jsx(L,{flowID:c,dropboxConf:a,setDropboxConf:n,step:i,setStep:d,isLoading:p,setIsLoading:m}),e.jsxs("div",{className:"btcd-stp-page",style:b({},i===2&&{width:900,height:"auto",overflow:"visible"}),children:[e.jsx(A,{flowID:c,formFields:o,dropboxConf:a,setDropboxConf:n}),e.jsxs("button",{onClick:()=>d(3),disabled:a.field_map.length<1,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",children:[D("Next","bit-integrations")," ",e.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),e.jsx(w,{step:i,saveConfig:()=>v(),isLoading:p,dataConf:a,setDataConf:n,formFields:o})]})}export{U as default};
