var v=Object.defineProperty;var x=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var h=(e,s,i)=>s in e?v(e,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[s]=i,m=(e,s)=>{for(var i in s||(s={}))A.call(s,i)&&h(e,i,s[i]);if(x)for(var i of x(s))_.call(s,i)&&h(e,i,s[i]);return e};import{j as t,_ as a}from"./main.2.9.0.js";import{b as g}from"./react-router.DMwpH23k.js";import{y as T}from"./Note.NSUdvR3c.js";import{e as z}from"./ClinchPadCommonFunc.Lk9z0JIP.js";import{T as I}from"./TutorialLink.CFG7bS5c.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.CEA_lFLo.js";function P({clinchPadConf:e,setClinchPadConf:s,step:i,setStep:j,loading:r,setLoading:k,isInfo:n}){const[o,y]=g.useState(!1),[c,d]=g.useState({api_key:""}),N=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e!=null&&e.default,j(2)},b=l=>{const p=m({},e),u=m({},c);u[l.target.name]="",p[l.target.name]=l.target.value,d(u),s(p)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:i===1&&900,height:i===1&&"auto"},children:[t.jsx(I,{linkKey:"clinchPad"}),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:b,name:"name",value:e.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:n}),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:b,name:"api_key",value:e.api_key,type:"text",placeholder:a("API Token...","bit-integrations"),disabled:n}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:c.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",{}),!n&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>z(e,s,d,y,r,k),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||r.auth,children:[o?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),r.auth&&t.jsx(T,{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:[a("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{P as default};
