var v=Object.defineProperty;var u=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable;var b=(s,t,i)=>t in s?v(s,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[t]=i,h=(s,t)=>{for(var i in t||(t={}))z.call(t,i)&&b(s,i,t[i]);if(u)for(var i of u(t))y.call(t,i)&&b(s,i,t[i]);return s};import{j as e,_ as a}from"./main.2.8.1.js";import{d as x}from"./react-router-dom.9mCuUg3q.js";import{t as A}from"./tutorialLinks.kMkIDzcD.js";import{a9 as C,z as L}from"./Note.BeM7sN-p.js";import{T as I}from"./TutorialLink.BAFX--T3.js";import{w as P}from"./WPCafeCommonFunc.Dxed9e_Q.js";import"./CopyIcn.3gZpHton.js";function R({formID:s,wpcafeConf:t,setWpcafeConf:i,step:o,nextPage:p,isLoading:l,setIsLoading:g,isInfo:m}){const[r,j]=x.useState(!1),[N,f]=x.useState({name:""}),{wpcafe:n}=A,k=d=>{const c=h({},t);c[d.target.name]=d.target.value,i(c)};return e.jsxs("div",{className:"btcd-stp-page",style:{width:o===1&&900,height:o===1&&"auto"},children:[n==null?void 0:n.youTubeLink,e.jsx(I,{title:"WPCafe",docLink:n==null?void 0:n.docLink}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("Integration Name:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:k,name:"name",value:t.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:m}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:N.name}),e.jsx(C,{note:a("To use WPCafe integration, make sure WPCafe plugin is installed and active on your site.","bit-integrations")}),!m&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>P(t,i,f,j,g),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:r||l,children:[r?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),l&&e.jsx(L,{size:20,clr:"#022217",className:"ml-2"})]}),e.jsx("br",{}),e.jsxs("button",{onClick:()=>p(2),className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!r,children:[a("Next","bit-integrations"),e.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{R as default};
