var y=Object.defineProperty;var x=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var b=(i,s,e)=>s in i?y(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e,p=(i,s)=>{for(var e in s||(s={}))z.call(s,e)&&b(i,e,s[e]);if(x)for(var e of x(s))C.call(s,e)&&b(i,e,s[e]);return i};import{j as t,_ as a,d as E}from"./main.2.8.1.js";import{d as j}from"./react-router-dom.9mCuUg3q.js";import{B as A}from"./BackIcn._kGL_vVw.js";import{t as O}from"./tutorialLinks.kMkIDzcD.js";import{z as f}from"./Note.BeM7sN-p.js";import{T as I}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function H({formID:i,seoPressConf:s,setSeoPressConf:e,step:o,nextPage:N,isLoading:r,setIsLoading:d,setSnackbar:g,isInfo:m}){const[l,v]=j.useState(!1),[h,S]=j.useState(!1),{seoPress:n}=O,k=()=>{d("auth"),E({},"seopress_authorize").then(c=>{c!=null&&c.success&&(v(!0),g({show:!0,msg:a("Connected with SEOPress Successfully","bit-integrations")})),d(!1),S(!0)})},w=c=>{const u=p({},s);u[c.target.name]=c.target.value,e(u)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:o===1&&900,height:o===1&&"auto"},children:[n==null?void 0:n.youTubeLink,t.jsx(I,{title:"SEOPress",docLink:n==null?void 0:n.docLink}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:w,name:"name",value:s.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:m}),r==="auth"&&t.jsxs("div",{className:"flx mt-5",children:[t.jsx(f,{size:25,clr:"#022217",className:"mr-2"}),a("Checking if SEOPress is active!!!","bit-integrations")]}),h&&!l&&!r&&t.jsx("div",{className:"flx mt-5",style:{width:900,justifyContent:"center"},children:t.jsxs("div",{className:"txt-center",children:[t.jsx("div",{className:"btcd-icn btcd-icn-err",children:t.jsx("span",{children:"✕"})}),t.jsx("div",{className:"mt-2",children:a("SEOPress is not activated or not installed","bit-integrations")})]})}),h&&l&&!r&&t.jsxs("div",{className:"flx mt-5",style:{width:900},children:[t.jsx("div",{className:"btcd-icn btcd-icn-success",children:t.jsx("span",{children:"✓"})}),t.jsx("div",{className:"mt-2",children:a("SEOPress is activated","bit-integrations")})]}),t.jsxs("button",{onClick:k,className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||m,children:[a("Connect","bit-integrations"),r==="auth"&&t.jsx(f,{size:20,clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:()=>N(2),className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!l,children:[a("Next","bit-integrations"),t.jsx(A,{className:"ml-1 rev-icn"})]})]})}export{H as default};
