var P=Object.defineProperty,K=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var d=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var I=(e,t,i)=>t in e?P(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,b=(e,t)=>{for(var i in t||(t={}))$.call(t,i)&&I(e,i,t[i]);if(d)for(var i of d(t))v.call(t,i)&&I(e,i,t[i]);return e},g=(e,t)=>K(e,E(t));var A=(e,t,i)=>new Promise((c,n)=>{var l=o=>{try{u(i.next(o))}catch(s){n(s)}},m=o=>{try{u(i.throw(o))}catch(s){n(s)}},u=o=>o.done?c(o.value):Promise.resolve(o.value).then(l,m);u((i=i.apply(e,t)).next())});import{_ as a,j as r}from"./main.2.8.10.js";import{b as y}from"./react-router.DMwpH23k.js";import{S as T,I as x,E as w,G as N,A as S}from"./StepPage.Dcszwd6s.js";import{a9 as _}from"./Note.DalStCGz.js";import{h as f,d as z,b as G}from"./SelzyCommonFunc.BXJ1RhU4.js";import{T as B}from"./TutorialLink.D6K_DiHL.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";import"./Integrations.BFhED4ck.js";import"./SnackMsg.7BjcJK1j.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";function Y({selzyConf:e,setSelzyConf:t,step:i,setStep:c,loading:n,setLoading:l,isInfo:m}){const[u,o]=y.useState(!1),[s,h]=y.useState({name:"",authKey:""}),k=()=>A(null,null,function*(){setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),c(2),l(g(b({},n),{page:!0})),(yield G(e,t))&&l(g(b({},n),{page:!1}))}),j=`
  <h4>${a("Step of get API Key:","bit-integrations")}</h4>
  <ul>
    <li>${a("Goto Settings and click on","bit-integrations")} <a href="https://cp.selzy.com/en/v5/user/info/api" target='_blank'>${a("Integration and API.","bit-integrations")}</a></li>
    <li>${a("API access section API key click show full.","bit-integrations")}</li>
    <li>${a("Enter your password and click send","bit-integrations")}</li>
    <li>${a("Copy the <b>API Key</b> and paste into <b>API Key</b> field of your authorization form.","bit-integrations")}</li>
    <li>${a("Finally, click <b>Authorize</b> button.","bit-integrations")}</li>
</ul>
`;return r.jsxs(T,{step:i,stepNo:1,style:{width:900,height:"auto"},children:[r.jsx(B,{linkKey:"selzy"}),r.jsxs("div",{className:"mt-2",children:[r.jsx(x,{label:a("Integration Name","bit-integrations"),name:"name",placeholder:a("Integration Name...","bit-integrations"),value:e.name,onchange:p=>f(p,e,t,s,h)}),r.jsx(x,{label:a("API key","bit-integrations"),name:"authKey",placeholder:a("API key...","bit-integrations"),value:e.authKey,onchange:p=>f(p,e,t,s,h)}),r.jsx(w,{error:s.authKey}),r.jsx(N,{url:"https://cp.selzy.com/en/v5/user/info/api",info:a("To get API key, please visit","bit-integrations")}),!m&&r.jsx(S,{onclick:()=>z(e,t,h,o,n,l),nextPage:k,auth:u,loading:n.auth})]}),r.jsx(_,{note:j})]})}export{Y as default};
