var _=Object.defineProperty;var g=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var j=(s,e,i)=>e in s?_(s,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[e]=i,c=(s,e)=>{for(var i in e||(e={}))z.call(e,i)&&j(s,i,e[i]);if(g)for(var i of g(e))L.call(e,i)&&j(s,i,e[i]);return s};import{j as t,_ as a}from"./main.2.8.1.js";import{d as k}from"./react-router-dom.9mCuUg3q.js";import{z as S}from"./Note.BeM7sN-p.js";import{a as T}from"./SureCartCommonFunc.CXfk-Ps-.js";import{t as w}from"./tutorialLinks.kMkIDzcD.js";import{T as y}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function H({formID:s,sureCartConf:e,setSureCartConf:i,step:d,setStep:N,isLoading:m,setIsLoading:f,setSnackbar:E,redirectLocation:I,isInfo:n}){const[o,v]=k.useState(!1),[p,b]=k.useState({api_key:""}),{sureCart:r}=w,A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),N(2)},h=l=>{const u=c({},e),x=c({},p);x[l.target.name]="",u[l.target.name]=l.target.value,b(x),i(u)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:d===1&&900,height:d===1&&"auto"},children:[t.jsx(y,{title:"SureCart",youTubeLink:r==null?void 0:r.youTubeLink}),t.jsx(y,{title:"SureCart",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:h,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("App api key:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:h,name:"api_key",value:e.api_key,type:"text",placeholder:a("Api key...","bit-integrations"),disabled:n}),t.jsx("div",{style:{color:"red"},children:p.api_key}),t.jsxs("small",{className:"d-blk mt-5",children:[a("To get Api key , Please Visit  ","bit-integrations"),t.jsx("a",{className:"btcd-link",href:"https://app.surecart.com/developer",target:"_blank",rel:"noreferrer",children:a("SureCart","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!n&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:()=>T(e,i,b,v,f),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||m,children:[o?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),m&&t.jsx(S,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:A,className:"btn f-right 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{H as default};
