var k=Object.defineProperty;var x=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var p=(t,a,e)=>a in t?k(t,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[a]=e,l=(t,a)=>{for(var e in a||(a={}))z.call(a,e)&&p(t,e,a[e]);if(x)for(var e of x(a))E.call(a,e)&&p(t,e,a[e]);return t};import{j as s,_ as n}from"./main.2.8.10.js";import{b as h}from"./react-router.DMwpH23k.js";import{y as A}from"./Note.DalStCGz.js";import{f as I}from"./WPForoCommonFunc.DC3wfkgi.js";import{T as S}from"./TutorialLink.D6K_DiHL.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";function K({wpforoConf:t,setWPForoConf:a,step:e,setStep:g,loading:i,setLoading:j,isInfo:m}){const[r,N]=h.useState(!1),[o,d]=h.useState({name:""}),v=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),t!=null&&t.default,g(2)},y=c=>{const b=l({},t),u=l({},o);u[c.target.name]="",b[c.target.name]=c.target.value,d(u),a(b)};return s.jsxs("div",{className:"btcd-stp-page",style:{width:e===1&&900,height:e===1&&"auto"},children:[s.jsx(S,{linkKey:"wpforo"}),s.jsx("div",{className:"mt-3",children:s.jsx("b",{children:n("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:n("Integration Name...","bit-integrations"),disabled:m}),o.name&&s.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.name}),s.jsx("br",{}),!m&&s.jsxs("div",{children:[s.jsxs("button",{onClick:()=>I(t,d,N,i,j),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:r||i.auth,children:[r?n("Connected ✔","bit-integrations"):n("Connect to WPForo","bit-integrations"),i.auth&&s.jsx(A,{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:!r,children:[n("Next","bit-integrations"),s.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{K as default};
