var L=Object.defineProperty;var u=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var l=(e,t,s)=>t in e?L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,x=(e,t)=>{for(var s in t||(t={}))C.call(t,s)&&l(e,s,t[s]);if(u)for(var s of u(t))M.call(t,s)&&l(e,s,t[s]);return e};import{j as o,_ as A}from"./main.2.9.0.js";import{u as I,e as N,b as m}from"./react-router.DMwpH23k.js";import"./CopyIcn.CEA_lFLo.js";import{S as k}from"./SnackMsg.DYSD96P4.js";import{S as w}from"./Steps.BYe8zHkm.js";import{I as _,s as D}from"./Integrations.DL8wqGct.js";import{M as E,i as T}from"./MasterStudyLmsIntegLayout.BRpAFs94.js";import F from"./MasterStudyLmsAuthorization.DUAPTQhP.js";import"./TutorialLink.CFG7bS5c.js";import"./react-vendor.P7K3d6op.js";import"./Note.NSUdvR3c.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";import"./ProUtilHelpers.CHf_DzPf.js";import"./TagifyInput.KPPRQJ1B.js";import"./lodash.DCvQBX3r.js";import"./GlobalIntegrationHelper.B6YI8w_n.js";import"./BackIcn._8Wofmn2.js";function st({formFields:e,setFlow:t,flow:s,allIntegURL:d,isInfo:b,edit:g}){const S=I(),{formID:h}=N(),[a,c]=m.useState(!1),[n,f]=m.useState(1),[j,r]=m.useState({show:!1}),[i,p]=m.useState({name:"MasterStudyLms",type:"MasterStudyLms",mainAction:"",field_map:[{formField:"",msLmsFormField:""}],actions:{}}),v=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),i.mainAction!==""&&f(3)};function y(){return T(i)}return o.jsxs("div",{children:[o.jsx(k,{snack:j,setSnackbar:r}),o.jsx("div",{className:"txt-center mt-2",children:o.jsx(w,{step:3,active:n})}),o.jsx(F,{formID:h,msLmsConf:i,setMsLmsConf:p,step:n,setStep:f,isLoading:a,setIsLoading:c,setSnackbar:r}),o.jsxs("div",{className:"btcd-stp-page",style:x({},n===2&&{width:900,height:"auto",overflow:"visible"}),children:[o.jsx(E,{formFields:e,msLmsConf:i,setMsLmsConf:p,isLoading:a,setIsLoading:c,setSnackbar:r,allIntegURL:d,isInfo:b,edit:g}),o.jsxs("button",{onClick:()=>v(),disabled:!i.mainAction||a||y(),className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",children:[A("Next","bit-integrations")," ",o.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),o.jsx(_,{step:n,saveConfig:()=>D({flow:s,setFlow:t,allIntegURL:d,navigate:S,conf:i,setIsLoading:c,setSnackbar:r}),isLoading:a,dataConf:i,setDataConf:p,formFields:e})]})}export{st as default};
