var E=Object.defineProperty,K=Object.defineProperties;var $=Object.getOwnPropertyDescriptors;var I=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var k=(i,t,e)=>t in i?E(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,g=(i,t)=>{for(var e in t||(t={}))v.call(t,e)&&k(i,e,t[e]);if(I)for(var e of I(t))S.call(t,e)&&k(i,e,t[e]);return i},d=(i,t)=>K(i,$(t));var A=(i,t,e)=>new Promise((m,r)=>{var u=n=>{try{c(e.next(n))}catch(s){r(s)}},h=n=>{try{c(e.throw(n))}catch(s){r(s)}},c=n=>n.done?m(n.value):Promise.resolve(n.value).then(u,h);c((e=e.apply(i,t)).next())});import{_ as a,j as o}from"./main.2.8.1.js";import{d as x}from"./react-router-dom.9mCuUg3q.js";import{S as w,I as f,E as N,G as L,A as _}from"./StepPage.B2uuvkiP.js";import{a9 as G}from"./Note.BeM7sN-p.js";import{h as y,d as B,b as F}from"./SelzyCommonFunc.BO1RenoT.js";import{t as z}from"./tutorialLinks.kMkIDzcD.js";import{T as j}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";import"./Integrations.D2bgBas2.js";import"./SnackMsg.S8DrwLlT.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";function Z({selzyConf:i,setSelzyConf:t,step:e,setStep:m,loading:r,setLoading:u,isInfo:h}){const[c,n]=x.useState(!1),[s,b]=x.useState({name:"",authKey:""}),{selzy:l}=z,P=()=>A(null,null,function*(){setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),m(2),u(d(g({},r),{page:!0})),(yield F(i,t))&&u(d(g({},r),{page:!1}))}),T=`
  <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 o.jsxs(w,{step:e,stepNo:1,style:{width:900,height:"auto"},children:[o.jsx(j,{title:"Selzy",youTubeLink:l==null?void 0:l.youTubeLink}),o.jsx(j,{title:"Selzy",docLink:l==null?void 0:l.docLink}),o.jsxs("div",{className:"mt-2",children:[o.jsx(f,{label:a("Integration Name","bit-integrations"),name:"name",placeholder:a("Integration Name...","bit-integrations"),value:i.name,onchange:p=>y(p,i,t,s,b)}),o.jsx(f,{label:a("API key","bit-integrations"),name:"authKey",placeholder:a("API key...","bit-integrations"),value:i.authKey,onchange:p=>y(p,i,t,s,b)}),o.jsx(N,{error:s.authKey}),o.jsx(L,{url:"https://cp.selzy.com/en/v5/user/info/api",info:a("To get API key, please visit","bit-integrations")}),!h&&o.jsx(_,{onclick:()=>B(i,t,b,n,r,u),nextPage:P,auth:c,loading:r.auth})]}),o.jsx(G,{note:T})]})}export{Z as default};
