var v=Object.defineProperty;var d=Object.getOwnPropertySymbols;var y=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var u=(s,t,i)=>t in s?v(s,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[t]=i,b=(s,t)=>{for(var i in t||(t={}))y.call(t,i)&&u(s,i,t[i]);if(d)for(var i of d(t))z.call(t,i)&&u(s,i,t[i]);return s};import{j as e,_ as a}from"./main.2.9.0.js";import{b as p}from"./react-router.DMwpH23k.js";import{a9 as k,y as A}from"./Note.NSUdvR3c.js";import{T as w}from"./TutorialLink.CFG7bS5c.js";import{w as C}from"./WPCafeCommonFunc.B28K388S.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.CEA_lFLo.js";function F({formID:s,wpcafeConf:t,setWpcafeConf:i,step:r,nextPage:h,isLoading:o,setIsLoading:x,isInfo:l}){const[n,g]=p.useState(!1),[j,f]=p.useState({name:""}),N=m=>{const c=b({},t);c[m.target.name]=m.target.value,i(c)};return e.jsxs("div",{className:"btcd-stp-page",style:{width:r===1&&900,height:r===1&&"auto"},children:[e.jsx(w,{linkKey:"wpcafe"}),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:N,name:"name",value:t.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:l}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:j.name}),e.jsx(k,{note:a("To use WPCafe integration, make sure WPCafe plugin is installed and active on your site.","bit-integrations")}),!l&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>C(t,i,f,g,x),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:n||o,children:[n?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),o&&e.jsx(A,{size:20,clr:"#022217",className:"ml-2"})]}),e.jsx("br",{}),e.jsxs("button",{onClick:()=>h(2),className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!n,children:[a("Next","bit-integrations"),e.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{F as default};
