var z=Object.defineProperty,I=Object.defineProperties;var S=Object.getOwnPropertyDescriptors;var j=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var k=(t,s,n)=>s in t?z(t,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[s]=n,b=(t,s)=>{for(var n in s||(s={}))$.call(s,n)&&k(t,n,s[n]);if(j)for(var n of j(s))w.call(s,n)&&k(t,n,s[n]);return t},m=(t,s)=>I(t,S(s));import{j as e,_ as i}from"./main.2.8.10.js";import{b as h}from"./react-router.DMwpH23k.js";import{y as E,a9 as K}from"./Note.DalStCGz.js";import{T as L}from"./TutorialLink.D6K_DiHL.js";import{a as R}from"./ACPTCommonFunc.iH3r2Kh_.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";function M({acptConf:t,setAcptConf:s,step:n,setStep:v,loading:l,setLoading:A,isInfo:a}){var u,x,g;const[r,N]=h.useState(!1),[o,p]=h.useState({api_key:"",api_secret:""}),d=h.useCallback(_=>{const{name:y,value:P}=_.target;s(c=>m(b({},c),{[y]:P})),p(c=>m(b({},c),{[y]:""}))},[]),T=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),r&&v(2)};return e.jsxs("div",{className:"btcd-stp-page",style:{width:n===1&&900,height:n===1&&"auto"},children:[e.jsx(L,{linkKey:"acpt"}),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:d,name:"name",value:(u=t==null?void 0:t.name)!=null?u:"",type:"text",placeholder:i("Integration Name...","bit-integrations"),disabled:a}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.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:d,name:"base_url",value:(x=t==null?void 0:t.base_url)!=null?x:"",type:"text",placeholder:i("Homepage URL...","bit-integrations"),disabled:a}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.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:d,name:"api_key",value:(g=t==null?void 0:t.api_key)!=null?g:"",type:"text",placeholder:i("Api Key-Secret:","bit-integrations"),disabled:a}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.api_key})]}),!a&&e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>R(t,p,N,l,A),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:r||l.auth,children:[r?i("Authorized ✔","bit-integrations"):i("Authorize","bit-integrations"),l.auth&&e.jsx(E,{size:"20",clr:"#022217",className:"ml-2"})]}),e.jsx("br",{}),e.jsxs("button",{onClick:T,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!r,children:[i("Next","bit-integrations"),e.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),e.jsx(K,{note:G})]})}const G=`
            <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};
