var T=Object.defineProperty;var h=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var g=(e,s,i)=>s in e?T(e,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[s]=i,d=(e,s)=>{for(var i in s||(s={}))_.call(s,i)&&g(e,i,s[i]);if(h)for(var i of h(s))z.call(s,i)&&g(e,i,s[i]);return e};import{j as t,_ as a}from"./main.2.8.1.js";import{d as j}from"./react-router-dom.9mCuUg3q.js";import{z as I}from"./Note.BeM7sN-p.js";import{e as L}from"./ClinchPadCommonFunc.DI-lX3n6.js";import{t as w}from"./tutorialLinks.kMkIDzcD.js";import{T as k}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function q({clinchPadConf:e,setClinchPadConf:s,step:i,setStep:y,loading:n,setLoading:N,isInfo:o}){const[l,v]=j.useState(!1),[b,c]=j.useState({api_key:""}),{clinchPad:r}=w,A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e!=null&&e.default,y(2)},p=m=>{const u=d({},e),x=d({},b);x[m.target.name]="",u[m.target.name]=m.target.value,c(x),s(u)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:i===1&&900,height:i===1&&"auto"},children:[t.jsx(k,{title:"ClinchPad",youTubeLink:r==null?void 0:r.youTubeLink}),t.jsx(k,{title:"ClinchPad",docLink:r==null?void 0:r.docLink}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:p,name:"name",value:e.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:o}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("API Key:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:p,name:"api_key",value:e.api_key,type:"text",placeholder:a("API Token...","bit-integrations"),disabled:o}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:b.api_key}),t.jsxs("small",{className:"d-blk mt-3",children:[a("To Get API Token, Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://clinchpad.com/#settings",target:"_blank",rel:"noreferrer",children:a("ClinchPad API Token","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!o&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>L(e,s,c,v,n,N),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||n.auth,children:[l?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),n.auth&&t.jsx(I,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:A,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!l,children:[a("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{q as default};
