var L=Object.defineProperty;var g=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var j=(s,i,r)=>i in s?L(s,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[i]=r,b=(s,i)=>{for(var r in i||(i={}))T.call(i,r)&&j(s,r,i[r]);if(g)for(var r of g(i))_.call(i,r)&&j(s,r,i[r]);return s};import{r as k,j as t}from"./main-406.js";import{_ as a,L as z}from"./bi.394.85.js";import{e as I}from"./bi.6.885.js";import{T as h,t as w}from"./bi.150.760.js";function K({clinchPadConf:s,setClinchPadConf:i,step:r,setStep:y,loading:n,setLoading:N,isInfo:o}){const[l,v]=k.useState(!1),[u,p]=k.useState({api_key:""}),{clinchPad:e}=w,A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),s!=null&&s.default,y(2)},d=m=>{const x=b({},s),c=b({},u);c[m.target.name]="",x[m.target.name]=m.target.value,p(c),i(x)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:r===1&&900,height:r===1&&"auto"},children:[(e==null?void 0:e.youTubeLink)&&t.jsx(h,{title:e==null?void 0:e.title,youTubeLink:e==null?void 0:e.youTubeLink}),(e==null?void 0:e.docLink)&&t.jsx(h,{title:e==null?void 0:e.title,docLink:e==null?void 0:e.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:d,name:"name",value:s.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:d,name:"api_key",value:s.api_key,type:"text",placeholder:a("API Token...","bit-integrations"),disabled:o}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:u.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:()=>I(s,i,p,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(z,{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{K as default};
