var z=Object.defineProperty;var h=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var p=(t,n,e)=>n in t?z(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,m=(t,n)=>{for(var e in n||(n={}))L.call(n,e)&&p(t,e,n[e]);if(h)for(var e of h(n))E.call(n,e)&&p(t,e,n[e]);return t};import{j as s,_ as i}from"./main.2.8.1.js";import{d as g}from"./react-router-dom.9mCuUg3q.js";import{z as T}from"./Note.BeM7sN-p.js";import{f as A}from"./WPForoCommonFunc.JqO37tk0.js";import{t as I}from"./tutorialLinks.kMkIDzcD.js";import{T as S}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function G({wpforoConf:t,setWPForoConf:n,step:e,setStep:j,loading:r,setLoading:N,isInfo:d}){const[c,k]=g.useState(!1),[o,u]=g.useState({name:""}),{wpforo:a}=I,v=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),t!=null&&t.default,j(2)},y=l=>{const b=m({},t),x=m({},o);x[l.target.name]="",b[l.target.name]=l.target.value,u(x),n(b)};return s.jsxs("div",{className:"btcd-stp-page",style:{width:e===1&&900,height:e===1&&"auto"},children:[a==null?void 0:a.youTubeLink,s.jsx(S,{title:"wpforo",docLink:a==null?void 0:a.docLink}),s.jsx("div",{className:"mt-3",children:s.jsx("b",{children:i("Integration Name:","bit-integrations")})}),s.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:y,name:"name",value:t.name,type:"text",placeholder:i("Integration Name...","bit-integrations"),disabled:d}),o.name&&s.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.name}),s.jsx("br",{}),!d&&s.jsxs("div",{children:[s.jsxs("button",{onClick:()=>A(t,u,k,r,N),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:c||r.auth,children:[c?i("Connected ✔","bit-integrations"):i("Connect to WPForo","bit-integrations"),r.auth&&s.jsx(T,{size:"20",clr:"#022217",className:"ml-2"})]}),s.jsx("br",{}),s.jsxs("button",{onClick:v,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!c,children:[i("Next","bit-integrations"),s.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{G as default};
