var v=Object.defineProperty;var g=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var x=(e,i,a)=>i in e?v(e,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[i]=a,c=(e,i)=>{for(var a in i||(i={}))T.call(i,a)&&x(e,a,i[a]);if(g)for(var a of g(i))I.call(i,a)&&x(e,a,i[a]);return e};import{_ as s,j as t}from"./main.2.9.0.js";import{b as j}from"./react-router.DMwpH23k.js";import{y as _,a9 as w}from"./Note.NSUdvR3c.js";import{n as z,g as P}from"./NimbleCommonFunc.B7696uJi.js";import{T as E}from"./TutorialLink.CFG7bS5c.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.CEA_lFLo.js";function R({nimbleConf:e,setNimbleConf:i,step:a,setStep:k,loading:n,setLoading:d,isInfo:r}){const[o,y]=j.useState(!1),[m,p]=j.useState({api_key:""}),N=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e!=null&&e.default,k(2),P(e,i,d)},b=l=>{const h=c({},e),u=c({},m);u[l.target.name]="",h[l.target.name]=l.target.value,p(u),i(h)},A=`
            <h4>${s("To Get API Token","bit-integrations")}</h4>
            <ul>
                <li>${s("First go to your Nimble dashboard.","bit-integrations")}</li>
                <li>${s('Click go to "Settings"',"bit-integrations")}</li>
                <li>${s('Then Click "API Tokens"',"bit-integrations")}</li>
                <li>${s('Then Click "Generate New Token',"bit-integrations")}</li>
            </ul>`;return t.jsxs("div",{className:"btcd-stp-page",style:{width:a===1&&900,height:a===1&&"auto"},children:[t.jsx(E,{linkKey:"nimble"}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:s("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:b,name:"name",value:e.name,type:"text",placeholder:s("Integration Name...","bit-integrations"),disabled:r}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:s("API Key:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:b,name:"api_key",value:e.api_key,type:"text",placeholder:s("API Key...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:m.api_key}),t.jsxs("small",{className:"d-blk mt-3",children:[s("To get API key, please visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://app.nimble.com/#app/settings/tokens",target:"_blank",children:s("Nimble API Token","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!r&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>z(e,i,p,y,n,d),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||n.auth,children:[o?s("Authorized ✔","bit-integrations"):s("Authorize","bit-integrations"),n.auth&&t.jsx(_,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:N,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!o,children:[s("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(w,{note:A})]})}export{R as default};
