var I=Object.defineProperty,S=Object.defineProperties;var $=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var v=(t,s,n)=>s in t?I(t,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[s]=n,m=(t,s)=>{for(var n in s||(s={}))w.call(s,n)&&v(t,n,s[n]);if(k)for(var n of k(s))E.call(s,n)&&v(t,n,s[n]);return t},u=(t,s)=>S(t,$(s));import{j as e,_ as i}from"./main.2.8.1.js";import{d as h}from"./react-router-dom.9mCuUg3q.js";import{t as L}from"./tutorialLinks.kMkIDzcD.js";import{z as R,a9 as G}from"./Note.BeM7sN-p.js";import{a as K}from"./ACPTCommonFunc.Bw3Hgvq6.js";import"./CopyIcn.3gZpHton.js";function M({acptConf:t,setAcptConf:s,step:n,setStep:A,loading:o,setLoading:N,isInfo:a}){var x,g,y;const[l,T]=h.useState(!1),[d,p]=h.useState({api_key:"",api_secret:""}),{acpt:r}=L,b=h.useCallback(z=>{const{name:j,value:P}=z.target;s(c=>u(m({},c),{[j]:P})),p(c=>u(m({},c),{[j]:""}))},[]),_=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),l&&A(2)};return e.jsxs("div",{className:"btcd-stp-page",style:{width:n===1&&900,height:n===1&&"auto"},children:[r==null?void 0:r.youTubeLink,r==null?void 0:r.docLink,e.jsxs("div",{children:[e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:i("Integration Name:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:b,name:"name",value:(x=t==null?void 0:t.name)!=null?x:"",type:"text",placeholder:i("Integration Name...","bit-integrations"),disabled:a}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:d.name})]}),e.jsxs("div",{children:[e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:i("Homepage URL:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:b,name:"base_url",value:(g=t==null?void 0:t.base_url)!=null?g:"",type:"text",placeholder:i("Homepage URL...","bit-integrations"),disabled:a}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:d.base_url})]}),e.jsxs("div",{children:[e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:i("Api Key-Secret:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:b,name:"api_key",value:(y=t==null?void 0:t.api_key)!=null?y:"",type:"text",placeholder:i("Api Key-Secret:","bit-integrations"),disabled:a}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:d.api_key})]}),!a&&e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>K(t,p,T,o,N),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||o.auth,children:[l?i("Authorized ✔","bit-integrations"):i("Authorize","bit-integrations"),o.auth&&e.jsx(R,{size:"20",clr:"#022217",className:"ml-2"})]}),e.jsx("br",{}),e.jsxs("button",{onClick:_,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!l,children:[i("Next","bit-integrations"),e.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),e.jsx(G,{note:H})]})}const H=`
            <b>${i("Please note","bit-integrations")}</b>
            <p>${i("The secret key will no longer be displayed, so please take note of it. Eventually, you can regenerate your API keys.","bit-integrations")}</p>
            <h4>${i("To Get Api Key-secret","bit-integrations")}</h4>
            <ul>
                <li>${i('First go to "ACPT" dashboard',"bit-integrations")}</li>
                <li>${i('Then go to "Tools" from menu',"bit-integrations")}</li>
                <li>${i('Click on "Go to API dashboard" from tools',"bit-integrations")}</li>
                <li>${i('Then click "REST API" from the top sub menu',"bit-integrations")}</li>
                <li>${i('Then If you don’t have one API key click on the "Generate API key" button.',"bit-integrations")}</li>
                <li>${i('The API "key-secret" pair will be displayed in a popup.',"bit-integrations")}</li>
            </ul>`;export{M as default};
