var w=Object.defineProperty;var x=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var b=(i,s,e)=>s in i?w(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e,u=(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,b as k}from"./main.2.8.10.js";import{b as p}from"./react-router.DMwpH23k.js";import{B as E}from"./BackIcn.BFDZx8No.js";import{y as j}from"./Note.DalStCGz.js";import{T as A}from"./TutorialLink.D6K_DiHL.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";function F({formID:i,seoPressConf:s,setSeoPressConf:e,step:l,nextPage:f,isLoading:r,setIsLoading:o,setSnackbar:N,isInfo:m}){const[c,g]=p.useState(!1),[d,v]=p.useState(!1),y=()=>{o("auth"),k({},"seopress_authorize").then(n=>{n!=null&&n.success&&(g(!0),N({show:!0,msg:a("Connected with SEOPress Successfully","bit-integrations")})),o(!1),v(!0)})},S=n=>{const h=u({},s);h[n.target.name]=n.target.value,e(h)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:l===1&&900,height:l===1&&"auto"},children:[t.jsx(A,{linkKey:"seoPress"}),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:S,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(j,{size:25,clr:"#022217",className:"mr-2"}),a("Checking if SEOPress is active!!!","bit-integrations")]}),d&&!c&&!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")})]})}),d&&c&&!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:y,className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:c||m,children:[a("Connect","bit-integrations"),r==="auth"&&t.jsx(j,{size:20,clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:()=>f(2),className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!c,children:[a("Next","bit-integrations"),t.jsx(E,{className:"ml-1 rev-icn"})]})]})}export{F as default};
