var f=Object.defineProperty;var u=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var g=(s,e,a)=>e in s?f(s,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[e]=a,l=(s,e)=>{for(var a in e||(e={}))A.call(e,a)&&g(s,a,e[a]);if(u)for(var a of u(e))_.call(e,a)&&g(s,a,e[a]);return s};import{j as t,_ as i}from"./main.2.8.10.js";import{b as j}from"./react-router.DMwpH23k.js";import{y as z}from"./Note.DalStCGz.js";import{a as w}from"./SureCartCommonFunc.BMCUv7ZG.js";import{T as E}from"./TutorialLink.D6K_DiHL.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";function V({formID:s,sureCartConf:e,setSureCartConf:a,step:c,setStep:k,isLoading:m,setIsLoading:y,setSnackbar:S,redirectLocation:T,isInfo:r}){const[n,N]=j.useState(!1),[d,p]=j.useState({api_key:""}),v=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),k(2)},b=o=>{const h=l({},e),x=l({},d);x[o.target.name]="",h[o.target.name]=o.target.value,p(x),a(h)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:c===1&&900,height:c===1&&"auto"},children:[t.jsx(E,{linkKey:"sureCart"}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:i("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:i("Integration Name...","bit-integrations"),disabled:r}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:i("App 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:i("Api key...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red"},children:d.api_key}),t.jsxs("small",{className:"d-blk mt-5",children:[i("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:i("SureCart","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!r&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:()=>w(e,a,p,N,y),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:n||m,children:[n?i("Authorized ✔","bit-integrations"):i("Authorize","bit-integrations"),m&&t.jsx(z,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:v,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!n,children:[i("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{V as default};
